Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merchants] Change database structure for merchant slots #3974

Merged
merged 2 commits into from
Jan 14, 2024

Conversation

joligario
Copy link
Contributor

The slot field should be unsigned int. The temp slot is currently limited to 127. The client will limit the visible slots. Fixes selling to merchants with inventory >127 as seen in:
[**QueryErr**] **Zone** [**poknowledge**] MySQL Error (1264) [Out of range value for column 'slot' at row 1] Query [REPLACE INTO merchantlist_temp (npcid, slot, zone_id, instance_id, itemid, charges) VALUES(202173, 311, 202, 0, 26708, 1)]

image

image

The `slot` field should be unsigned int. The temp slot is currently limited to 127. The client will limit the visible slots.
@joligario
Copy link
Contributor Author

image

image

image

@Kinglykrab Kinglykrab merged commit e40267b into master Jan 14, 2024
2 checks passed
@Kinglykrab Kinglykrab deleted the merchantlists-slots branch January 14, 2024 01:58
@Akkadius Akkadius mentioned this pull request Jan 14, 2024
Kinglykrab added a commit that referenced this pull request Jan 25, 2024
### Bots

* ^mez command spell list fix ([#3998](#3998)) @dariusuknuis 2024-01-19

### Code

* Cleanup position methods ([#4015](#4015)) @Kinglykrab 2024-01-25

### Commands

* Add `#npcedit set_grid [Grid ID]` to `#npcedit` ([#4004](#4004)) @Kinglykrab 2024-01-22

### Crash Fix

* Fix crash when creating Frogloks/Drakkin ([#4016](#4016)) @Kinglykrab 2024-01-25
* Reverting PR #3877 ([#3997](#3997)) @fryguy503 2024-01-17

### Database

* Drop deprecated item_tick table ([#3977](#3977)) @Akkadius 2024-01-14
* Drop item_tick if exists tweak in manifest ([#3985](#3985)) @Akkadius 2024-01-15
* Increase max spawngroup name from 50 to 200 ([#3991](#3991)) @Akkadius 2024-01-22

### Fixes

* Fix Mercenaries Buffs/Zoning Issues ([#4000](#4000)) @Kinglykrab 2024-01-22
* Fix zone database update manifest ([#3972](#3972)) @Kinglykrab 2024-01-13
* Fixes to zone idle while empty changes. ([#4006](#4006)) @noudess 2024-01-23
* Reversed logic on InLiquid ([#3979](#3979)) @fryguy503 2024-01-14

### Instances

* Convert Instance Quest Methods to Repositories ([#4012](#4012)) @Kinglykrab 2024-01-25

### Logging

* Force Info category to be always on in file/console logs ([#3990](#3990)) @Akkadius 2024-01-22

### Merchants

* Change database structure for merchant slots ([#3974](#3974)) @joligario 2024-01-14

### Messages

* Fix disciple message added by previous patch. ([#3986](#3986)) @noudess 2024-01-15

### Quest API

* QuestReward should now summon item to the inventory instead of the cursor. ([#3996](#3996)) @regneq 2024-01-22

### Repositories

* Add `rank` to reserved words ([#3982](#3982)) @Akkadius 2024-01-15
* Fix datetime zero-value save behavior ([#3976](#3976)) @Akkadius 2024-01-14

### Spawn2

* Spawn condition value should default spawn_conditions value ([#3980](#3980)) @noudess 2024-01-14

### Zoning

* Additional logs for zoning under instance checks ([#3989](#3989)) @Akkadius 2024-01-22
@Kinglykrab Kinglykrab mentioned this pull request Jan 25, 2024
Akkadius pushed a commit that referenced this pull request Jan 25, 2024
### Bots

* ^mez command spell list fix ([#3998](#3998)) @dariusuknuis 2024-01-19

### Code

* Cleanup position methods ([#4015](#4015)) @Kinglykrab 2024-01-25

### Commands

* Add `#npcedit set_grid [Grid ID]` to `#npcedit` ([#4004](#4004)) @Kinglykrab 2024-01-22

### Crash Fix

* Fix crash when creating Frogloks/Drakkin ([#4016](#4016)) @Kinglykrab 2024-01-25
* Reverting PR #3877 ([#3997](#3997)) @fryguy503 2024-01-17

### Database

* Drop deprecated item_tick table ([#3977](#3977)) @Akkadius 2024-01-14
* Drop item_tick if exists tweak in manifest ([#3985](#3985)) @Akkadius 2024-01-15
* Increase max spawngroup name from 50 to 200 ([#3991](#3991)) @Akkadius 2024-01-22

### Fixes

* Fix Mercenaries Buffs/Zoning Issues ([#4000](#4000)) @Kinglykrab 2024-01-22
* Fix zone database update manifest ([#3972](#3972)) @Kinglykrab 2024-01-13
* Fixes to zone idle while empty changes. ([#4006](#4006)) @noudess 2024-01-23
* Reversed logic on InLiquid ([#3979](#3979)) @fryguy503 2024-01-14

### Instances

* Convert Instance Quest Methods to Repositories ([#4012](#4012)) @Kinglykrab 2024-01-25

### Logging

* Force Info category to be always on in file/console logs ([#3990](#3990)) @Akkadius 2024-01-22

### Merchants

* Change database structure for merchant slots ([#3974](#3974)) @joligario 2024-01-14

### Messages

* Fix disciple message added by previous patch. ([#3986](#3986)) @noudess 2024-01-15

### Quest API

* QuestReward should now summon item to the inventory instead of the cursor. ([#3996](#3996)) @regneq 2024-01-22

### Repositories

* Add `rank` to reserved words ([#3982](#3982)) @Akkadius 2024-01-15
* Fix datetime zero-value save behavior ([#3976](#3976)) @Akkadius 2024-01-14

### Spawn2

* Spawn condition value should default spawn_conditions value ([#3980](#3980)) @noudess 2024-01-14

### Zoning

* Additional logs for zoning under instance checks ([#3989](#3989)) @Akkadius 2024-01-22
xackery added a commit to jamfesteq/server that referenced this pull request Mar 18, 2024
* [Bug Fix] Remove duplicate character_data repository in zonedb.cpp (#3935)

# Notes
- Must have been a typo from one of my commits where they overlapped in functionality.

* [Bug Fix] IsOfClientBotMerc() for Discipline Messages (#3940)

* [Rules] Bash Two Hander use Shoulders (#3925)

Rule: BashTwoHanderUseShoulderAC
Default: False

Allows server operators to choose if they want two handed bash to utilize the shoulder armor or not.

Rule: BashACBonusDivisor
Default: 25.0

Allows adjustment for bash AC value contributions. Lower to increase damage.

* [Crash Fix] Character Creation Class/Race out of Range. (#3920)

* [Crash Fix] Character Creation Class/Race out of Range.

Known bug to crash the world server from character creation.

You can send a packet with a manual race or class entry below 0 or above 255 will cause world crash.

* Requested changes

* Compile fixes and logging change

* Fixed compile issues

* [Tasks] Add Support for Task Window Element Groups (#3902)

Elements that share a group are placed in the same list section and
separated from other groups with a divider.

Live appears to only use this for optional elements in some tasks and
when used each optional always gets its own group. This might indicate
it's done automatically under certain criteria to ensure optionals are
never grouped with non-optionals regardless of index.

Since groups are available in captures and there's very few tasks that
use this, we don't need to worry about trying to replicate any automatic
behavior since this allows more customization.

* [Bug Fix] Undead Should Never Flee (#3926)

* [Bug Fix] Undead Should Never Flee

Added a hard return on Undead Body Types. They should never flee under any circumstance.

* space

* [Feature] Rule: UseLiveBlockedMessage Bard Spam (#3933)

When using `UseLiveBlockedMessage` rule, bard will get massively spammed when doing aoe songs that are blocked. Not sure it is resonable to try and filter out all stacking messages from songs, but rather just block bards as a whole. I can not think of many cases where bards care of songs land or not when using this rule.

* [Bug Fix] Harm Touch Critical Ratio (#3915)

* [Bug] HT Crit Ratio

This is used to tune and bring HT Crits more in line with the correct values as proven in screenshots.

* requested changes

* mistakenly kept mob::

* [Rule] Allow GMs to silently summon (#3910)

* [Rule] Allow GMs to silently summon

Disable to silently summon players with #summon.

Converted SummonPC to a MessageString

* Implementing an automatic detection of gm hidden mode and silent summoning.

* [Rule] Add rule for bard aggro cap (#3909)

BardAggroCap - Default 40

Allows adjustment of per song bard aggro cap.

* [Rule] Separate Tradeskill Max Train from Research. (#3916)

* [Rule] Seperate Tradeskill Max Train from Research.

Different eras had different rules on the max gm trainable skill for Research.

* Phrasing

* [Bug Fix] Limit MeleeMitigationEffect to defender if only client. (#3918)

* [Bug] Limit MeleeMitigationEffect to defender if only client.

* Fix MeleeMitigation to properly Add (Substract due to negative values).

* defender fix

* [Feat] Alt Sinister Strike Formula (#3921)

I have been informed that this was proven to be false, but the AA is pretty useless without some adjustment.

Adding this as a rule to allow server owners to adjust as needed.

Update Sinister Strikes
tapatalk.com/groups/monklybusiness43508/leksikon-s-half-assed-guide-to-monkly-aas-oow-incl-t510-s20.html?sid=a9c7745f287f3e89301c960c20f33248

Sinister Strikes:
19 Delay weapon -- Gives a 5 damage bonus to all hits
20 Delay weapon -- Gives a 6 damage bonus to all hits
24 Delay weapon -- Gives a 7 damage bonus to all hits
Given Quarm hammer with maxed non-GoD AAs:
0.7 HPS offhand = 4.9 DPS increase.

* [Bug Fix] Attack Corpse Skill Up Fix (#3924)

* [Bug] Attack Corpse Skillup Fix

Occasions where a corpse will allow skillups from attacks being turned on (even if no damage)

* requested changes

* [Bug Fix] Increase Precision in CheckDoubleAttack (#3928)

* [Bug Fix] Increase percision on CheckDoubleAttack.

On DA Checks where class was a non skill based DA Attacker (Bard or BST with granted DA) The DA check was too steep and should not have been dividing by 500 but rather 100. Also adjusted logic percision to use floats so loss of data does not occur.

* logging var names update

* Update attack.cpp

---------

Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>

* [Rule] Classic Tracking Skillups (#3923)

* [Rule] Classic Tracking Skillups

Rule: TrackingAutoRefreshSkillUps
Default: True

Disable rule to prevent skillups from happening on auto refresh of tracking window.

* typo

* [Bug Fix] Rampage Number of Hits Limit (#3929)

* [Bug Fix] Rampage Number of Hits Limit

Rampage should Hit 1-2 times (Primary / Secondary) should not be Triple/Quadable

* requested name convention changes

* [Rules] Classic Spell Data SPA Calc variability (#3931)

* [Rules] Classic Spell Data SPA Calc variability

When  using lucy imports of older more classic data, they lack the limit values which provides Focus Random Effectiveness.

Example:

Bazu Plauge (6472) went from a 40 limit to 0 limit on the 2006 lucy import.

Lucy does have limit value data, but it appears the affected SPAs sony handled in source vs in spell data.

* Requested Changes

* [Bug Fix] Fix Issue with SetFlyMode() (#3961)

# Notes
- Variable and parameter had the same name, meaning this could fail.

* [Cleanup] Cleanup RandomizeFeatures() (#3958)

# Notes
- Uses pre-defined constants and cleanup code.
- Move `IsPlayerRace()` check so it's an early return instead of using an `else`.

* [Cleanup] Cleanup ChangeSize() (#3959)

# Notes
- Use `EQ::Clamp()` for logic instead of basic comparsions.
- Rename restriction parameter to `unrestricted`.

* [Cleanup] Cleanup AddCash() and RemoveCash() NPC Methods (#3957)

# Notes
- `AddCash()` was `uint16` in C++/Perl and `int` in Lua, fix these to `uint32`.
- Consolidate logic in `AddCash()`.

* [Experience Modifiers] Convert Load of Level Experience Modifiers to Repositories (#3952)

# Notes
- Convert `LoadLevelEXPMods()` to repositories.

* [Character] Convert Save of Character Languages to Repositories (#3948)

# Notes
- Convert `SaveCharacterLanguage()` to repositories.
- Was missed in the other languages changes.

* [Traps] Convert Load of LDoN Traps/Trap Entries to Repositories (#3953)

- Convert `LoadLDoNTraps()` and `LoadLDoNTrapEntries()` to repositories.

* [Repository] Add null integer column support, instance_list notes migration, regenerate repositories (#3969)

* [Respawns] Convert Respawn Times to Repositories (#3949)

* [Respawns] Convert Respawn Times to Repositories

- Convert `respawn_times` based methods to repositories.

* Missed some.

* Comments

* [Ground Spawns] Convert Ground Spawns to Repositories (#3967)

# Notes
- Convert `LoadGroundSpawns()` to repositories.

* [Pets] Convert Pets to Repositories (#3968)

* [Pets] Convert Pets to Repositories

# Notes
- Convert `GetPoweredPetEntry()` to repositories.

* Update pets.cpp

* [Objects] Convert Add/Delete/Update of Objects to Repositories (#3966)

* [Objects] Convert Add/Delete/Update of Objects to Repositories

- Convert `AddObject()`, `DeleteObject()`, and `UpdateObject()` to repositories.

* Update object_manipulation.cpp

* Update object_manipulation.cpp

* Update object_manipulation.cpp

* [Cleanup] Cleanup Owner Related Mob Methods (#3960)

* [Cleanup] Cleanup Owner Related Mob Methods

# Notes
- Cleanup `GetOwner()`, `GetOwnerOrSelf()`, `GetUltimateOwner()`, `HasOwner()`, and `IsPet()` methods.

* Update mob.cpp

* [Commands] Convert NPC Spawn Methods to Repositories (#3956)

* [Commands] Convert NPC Spawn Methods to Repositories

# Notes
- Convert `AddNewNPCSpawnGroupCommand()`, `AddNPCTypes()`, `AddSpawnFromSpawnGroup()`, `CreateNewNPCCommand()`, `DeleteSpawnLeaveInNPCTypeTable()`, `DeleteSpawnRemoveFromNPCTypeTable()`, `NPCSpawnDB()`, and `UpdateNPCTypeAppearance()`.

* Regenerate.

* Cleanup.

* [Item Ticks] Remove Item Ticks Code (#3955)

* [Items] Convert Load of Item Ticks to Repositories

- Convert `LoadItemTicks()` to repositories.

* Remove item tick code.

* Remove repository references.

* Update zone.h

* [Zones] Convert SaveZoneCFG to Repositories (#3950)

* [Zones] Convert SaveZoneCFG to Repositories

# Notes
- Convert `SaveZoneCFG()` to repositories.

* Comment

* safe_heading

* Update zone_data.cpp

* [Auras] Convert Get of Auras to Repositories (#3964)

* [Auras] Convert Get of Auras to Repositories

# Notes
- Convert `GetAuraEntry()` to repositories.

* Update aura.cpp

* [NPCs] Convert Load of NPC Emotes to Repositories (#3954)

* [NPCs] Convert Load of NPC Emotes to Repositories

- Convert `LoadNPCEmotes()` to repositories.

* Cleanup

* [Objects] Convert World Containers to Repositories (#3951)

* [Objects] Convert World Containers to Repositories

- Convert world containers to repositories.

* Update zonedb.cpp

* [Horses] Convert Horses to Repositories (#3965)

* [Horses] Convert Horses to Repositories

# Notes
- Convert `BuildHorseType()` to repositories.
- Removed unused code, parameters, and member variables in horses.

* Update horse.cpp

* [Global Loot] Convert Global Loot to Repositories (#3962)

* [Global Loot] Convert Global Loot to Repositories

# Notes
- Convert `LoadGlobalLoot()` to repositories.

* Update repository-generator.pl

* Final push.

* Update loottables.cpp

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>

* [AAs] Convert Loading of AAs to Repositories (#3963)

* [AAs] Convert Loading of AAs to Repositories

- Convert `LoadAlternateAdvancementAbilities()` to repositories.
- Regenerate repositories since a column was added to `aa_ability`.

* Update aa.cpp

* Update aa.cpp

* [Mercenaries] Convert Mercenaries to Repositories (#3947)

* [Mercenaries] Convert Mercenaries to Repositories

- Convert all Mercenary methods to repositories aside from inner join queries that cannot be converted.

* Update base_merc_subtypes_repository.h

* Update base_merc_subtypes_repository.h

* Regenerate repositories

* [Cleanup] Remove unused Grid methods (#3944)

# Notes
- Remove `AssignGrid()`, `GetGridType()`, `GetGridType2()`, and `GetWaypoints()` as they are unused.

* [Cleanup] Remove GroupCount() and RaidGroupCount() (#3943)

# Notes
- These are unused.

* [Feature] Add Lore Item Trade Error (#3932)

* DRAFT: [Feature] Add Lore Item Trade Error

I had lots of feedback from players to add feedback when doing player to player trades to include what items were causing the trade block.

I quickly added this check, however if multiple lore items are being traded, this will only output the first. So far it has worked well, but not sure if we want to:

- Expand this to list all lore items in the trade.
- Enable this by default and do not provide a rule?

* Credit to @KinglyKrab for the assist on making this output a list.

Ruled this off but enabled by default.

* [Merchants] Convert Clear/Delete/Save of Temporary Merchant Lists to Repositories (#3945)

* [Merchants] Convert Clear/Delete/Save of Temporary Merchant Lists to Repositories

- Convert `ClearMerchantTemp()`, `DeleteMerchantTemp()`, and `SaveMerchantTemp()` to repositories.

* Update merchantlist_temp_repository.h

* [Character] Convert Character Corpses to Repositories (#3941)

* asdsa

* Final push

* Update character_corpses_repository.h

* Update character_corpses_repository.h

* Update zonedb.cpp

* Update zonedb.cpp

* Final push

* Update character_corpses_repository.h

* [Character] Character EXP Modifiers in Memory (#3934)

* Cleanup

* Final push.

* Update zonedb.cpp

* Update zone.h

* Update exp.cpp

* Update zonedb.cpp

---------

Co-authored-by: Chris Miles <akkadius1@gmail.com>

* [Zones] Convert Get/Set of Zone Timezone to Repositories (#3946)

* [Zones] Convert Get/Set of Zone Timezone to Repositories

- Convert `GetZoneTimezone()` and `SetZoneTimeZone()` to repositories.

* Update time_zone.cpp

* [Zones] Convert IDLE_WHEN_EMPTY to a Zone Column (#3891)

* [Rules] Convert IDLE_WHEN_EMPTY to a rule

# Notes
- Converts `IDLE_WHEN_EMPTY` to `Zone:ZonesIdleWhenEmpty` so that we can change this on the fly or on a zone-by-zone basis instead of having to recompile to do this.
- Especially helpful for those using release binaries that do not compile their own source.

* Convert to zone column.

* Update ruletypes.h

* Update ruletypes.h

* Update entity.cpp

* Update entity.cpp

* Rename.

* Update database_update_manifest.cpp

* Update base_zone_repository.h

* Update zone.cpp

* seconds_before_idle

* Update database_update_manifest.cpp

* Getter/Setters/Private

* Update base_zone_repository.h

* IsIdle()/SetIsIdle()

* Update entity.cpp

* [Release] 22.42.0 (#3970)

### AAs

* Convert Loading of AAs to Repositories ([#3963](https://github.com/EQEmu/Server/pull/3963)) @Kinglykrab 2024-01-13

### Auras

* Convert Get of Auras to Repositories ([#3964](https://github.com/EQEmu/Server/pull/3964)) @Kinglykrab 2024-01-13

### Character

* Character EXP Modifiers in Memory ([#3934](https://github.com/EQEmu/Server/pull/3934)) @Kinglykrab 2024-01-13
* Convert Character Corpses to Repositories ([#3941](https://github.com/EQEmu/Server/pull/3941)) @Kinglykrab 2024-01-13
* Convert Save of Character Languages to Repositories ([#3948](https://github.com/EQEmu/Server/pull/3948)) @Kinglykrab 2024-01-12

### Code

* Cleanup AddCash() and RemoveCash() NPC Methods ([#3957](https://github.com/EQEmu/Server/pull/3957)) @Kinglykrab 2024-01-12
* Cleanup ChangeSize() ([#3959](https://github.com/EQEmu/Server/pull/3959)) @Kinglykrab 2024-01-12
* Cleanup Owner Related Mob Methods ([#3960](https://github.com/EQEmu/Server/pull/3960)) @Kinglykrab 2024-01-13
* Cleanup RandomizeFeatures() ([#3958](https://github.com/EQEmu/Server/pull/3958)) @Kinglykrab 2024-01-12
* Remove GroupCount() and RaidGroupCount() ([#3943](https://github.com/EQEmu/Server/pull/3943)) @Kinglykrab 2024-01-13
* Remove unused Grid methods ([#3944](https://github.com/EQEmu/Server/pull/3944)) @Kinglykrab 2024-01-13

### Commands

* Convert NPC Spawn Methods to Repositories ([#3956](https://github.com/EQEmu/Server/pull/3956)) @Kinglykrab 2024-01-13

### Crash Fix

* Character Creation Class/Race out of Range. ([#3920](https://github.com/EQEmu/Server/pull/3920)) @fryguy503 2024-01-09

### Feat

* Alt Sinister Strike Formula ([#3921](https://github.com/EQEmu/Server/pull/3921)) @fryguy503 2024-01-09

### Feature

* Add Lore Item Trade Error ([#3932](https://github.com/EQEmu/Server/pull/3932)) @fryguy503 2024-01-13
* Rule: UseLiveBlockedMessage Bard Spam ([#3933](https://github.com/EQEmu/Server/pull/3933)) @fryguy503 2024-01-09

### Fixes

* Attack Corpse Skill Up Fix ([#3924](https://github.com/EQEmu/Server/pull/3924)) @fryguy503 2024-01-09
* Fix Issue with SetFlyMode() ([#3961](https://github.com/EQEmu/Server/pull/3961)) @Kinglykrab 2024-01-12
* Harm Touch Critical Ratio ([#3915](https://github.com/EQEmu/Server/pull/3915)) @fryguy503 2024-01-09
* Increase Precision in CheckDoubleAttack ([#3928](https://github.com/EQEmu/Server/pull/3928)) @fryguy503 2024-01-09
* IsOfClientBotMerc() for Discipline Messages ([#3940](https://github.com/EQEmu/Server/pull/3940)) @fryguy503 2024-01-09
* Limit MeleeMitigationEffect to defender if only client. ([#3918](https://github.com/EQEmu/Server/pull/3918)) @fryguy503 2024-01-09
* Rampage Number of Hits Limit ([#3929](https://github.com/EQEmu/Server/pull/3929)) @fryguy503 2024-01-09
* Remove duplicate character_data repository in zonedb.cpp ([#3935](https://github.com/EQEmu/Server/pull/3935)) @Kinglykrab 2024-01-09
* Undead Should Never Flee ([#3926](https://github.com/EQEmu/Server/pull/3926)) @fryguy503 2024-01-09

### Global Loot

* Convert Global Loot to Repositories ([#3962](https://github.com/EQEmu/Server/pull/3962)) @Kinglykrab 2024-01-13

### Ground Spawns

* Convert Ground Spawns to Repositories ([#3967](https://github.com/EQEmu/Server/pull/3967)) @Kinglykrab 2024-01-13

### Horses

* Convert Horses to Repositories ([#3965](https://github.com/EQEmu/Server/pull/3965)) @Kinglykrab 2024-01-13

### Item Ticks

* Remove Item Ticks Code ([#3955](https://github.com/EQEmu/Server/pull/3955)) @Kinglykrab 2024-01-13

### Mercenaries

* Convert Mercenaries to Repositories ([#3947](https://github.com/EQEmu/Server/pull/3947)) @Kinglykrab 2024-01-13

### Merchants

* Convert Clear/Delete/Save of Temporary Merchant Lists to Repositories ([#3945](https://github.com/EQEmu/Server/pull/3945)) @Kinglykrab 2024-01-13

### NPCs

* Convert Load of NPC Emotes to Repositories ([#3954](https://github.com/EQEmu/Server/pull/3954)) @Kinglykrab 2024-01-13

### Objects

* Convert Add/Delete/Update of Objects to Repositories ([#3966](https://github.com/EQEmu/Server/pull/3966)) @Kinglykrab 2024-01-13
* Convert World Containers to Repositories ([#3951](https://github.com/EQEmu/Server/pull/3951)) @Kinglykrab 2024-01-13

### Pets

* Convert Pets to Repositories ([#3968](https://github.com/EQEmu/Server/pull/3968)) @Kinglykrab 2024-01-13

### Repositories

* Add null integer column support, instance_list notes migration, regenerate repositories ([#3969](https://github.com/EQEmu/Server/pull/3969)) @Akkadius 2024-01-13

### Respawns

* Convert Respawn Times to Repositories ([#3949](https://github.com/EQEmu/Server/pull/3949)) @Kinglykrab 2024-01-13

### Rules

* Add rule for bard aggro cap ([#3909](https://github.com/EQEmu/Server/pull/3909)) @fryguy503 2024-01-09
* Allow GMs to silently summon ([#3910](https://github.com/EQEmu/Server/pull/3910)) @fryguy503 2024-01-09
* Bash Two Hander use Shoulders ([#3925](https://github.com/EQEmu/Server/pull/3925)) @fryguy503 2024-01-09
* Classic Spell Data SPA Calc variability ([#3931](https://github.com/EQEmu/Server/pull/3931)) @fryguy503 2024-01-09
* Classic Tracking Skillups ([#3923](https://github.com/EQEmu/Server/pull/3923)) @fryguy503 2024-01-09
* Separate Tradeskill Max Train from Research. ([#3916](https://github.com/EQEmu/Server/pull/3916)) @fryguy503 2024-01-09

### Tasks

* Add Support for Task Window Element Groups ([#3902](https://github.com/EQEmu/Server/pull/3902)) @hgtw 2024-01-09

### Traps

* Convert Load of LDoN Traps/Trap Entries to Repositories ([#3953](https://github.com/EQEmu/Server/pull/3953)) @Kinglykrab 2024-01-13

### Zones

* Convert Get/Set of Zone Timezone to Repositories ([#3946](https://github.com/EQEmu/Server/pull/3946)) @Kinglykrab 2024-01-13
* Convert IDLE_WHEN_EMPTY to a Zone Column ([#3891](https://github.com/EQEmu/Server/pull/3891)) @Kinglykrab 2024-01-13
* Convert SaveZoneCFG to Repositories ([#3950](https://github.com/EQEmu/Server/pull/3950)) @Kinglykrab 2024-01-13

* [Bug Fix] quest::processmobswhilezoneempty() fix. (#3971)

* [Bug Fix] Fix zone database update manifest (#3972)

* [Bug Fix] Fix zone database update manifest

# Notes
- Missing comma.

* Update database_update_manifest.cpp

* [Release] 22.42.1 (#3973)

### Fixes

* Fix zone database update manifest ([#3972](https://github.com/EQEmu/Server/pull/3972)) @Kinglykrab 2024-01-13
* quest::processmobswhilezoneempty() fix. ([#3971](https://github.com/EQEmu/Server/pull/3971)) @noudess 2024-01-13

* [Merchants] Change database structure for merchant slots (#3974)

* [Merchants] Change database structure for merchant slots
The `slot` field should be unsigned int. The temp slot is currently limited to 127. The client will limit the visible slots.

* Update version.h

* [Repositories] Fix datetime zero-value save behavior (#3976)

* [Database] Drop deprecated item_tick table (#3977)

* [Release] 22.43.0 (#3978)

* [Repositories] Revert #3976 - fix character corpses

* [Bug Fix] Reversed logic on InLiquid (#3979)

Thank you @noudness for catching this. Reversed logic on InLiquid check for falling damage.

* [Spawn2] Spawn condition value should default spawn_conditions value (#3980)

* [Spawn2] Spawn condition value should default to value in spawn_conditions table

* Formatting changes and {}

* [Repositories] Add `rank` to reserved words (#3982)

* [Repositories] Add `rank` to reserved words

* Update zonedb.cpp

* Guild Ranks

---------

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>

* [Database] Drop item_tick if exists tweak in manifest (#3985)

* [Messages] Fix disciple message added by previous patch. (#3986)

* [Crash Fix] Reverting PR #3877 (#3997)

Reports of #3877 causing crashes on windows. No reports on Linux, but reverting for safety.

* Push discpline messages under melee->disciplines (#3987)

* Push discpline messages under melee->disciplines

* Added safe_delete()

* Remove fryguy's new message code and fix existing instead

* [Bot] ^mez command spell list fix (#3998)

This change will allow necros to cast mez spells when ^mez command is used.

* [Bug Fix] Fix Mercenaries Buffs/Zoning Issues (#4000)

# Notes
- Mercenaries were disappearing on zoning because they were saving to slot `1` and being loaded from slot `0`.
- Mercenaries were not displaying properly in group window because of this as well.
- Mercenary buffs were saving even when they did not have any buffs.

* [Zoning] Additional logs for zoning under instance checks (#3989)

* [Logging] Force Info category to be always on in file/console logs (#3990)

* [Database] Increase max spawngroup name from 50 to 200 (#3991)

* [Quest] QuestReward should now summon item to the inventory instead of the cursor. (#3996)

* [forage rule feature] add a rule to disabled using common_food_ids from the list in forage.cpp.  currently set to enabled.

* [Quest] change QuestReward summonitem to SummonItemToInventory.

* add closing brackets in QuestReward functions.

* [Commands] Add `#npcedit set_grid [Grid ID]` to `#npcedit` (#4004)

* [Commands] Add #npcedit grid_id to #npcedit

# Notes
- Adds `#npcedit grid_id [Grid ID]` to `#npcedit`.

* set_grid

* [Bug Fix] Fixes to zone idle while empty changes. (#4006)

* [Cleanup] Cleanup position methods (#4015)

# Notes
- Cleanup logic.

* [Instances] Convert Instance Quest Methods to Repositories (#4012)

* [Instances] Convert Instance Quest Methods to Repositories

# Notes
- Convert `UpdateInstanceTimer()` and `GetInstanceTimerByID()` to repositories.
- Cleanup other instance methods.

* Update questmgr.cpp

* [Crash Fix] Fix crash when creating Frogloks/Drakkin (#4016)

* [Crash Fix] Fix crash when creating Frogloks/Drakkin

# Notes
- https://github.com/EQEmu/Server/pull/3920 introduced an issue where we were using `uchar` for `race_selection` and `class_selection` which was not functioning properly within `IsPlayerRace()`.

* Update client.cpp

* [Release] 22.43.2 (#4017)

### Bots

* ^mez command spell list fix ([#3998](https://github.com/EQEmu/Server/pull/3998)) @dariusuknuis 2024-01-19

### Code

* Cleanup position methods ([#4015](https://github.com/EQEmu/Server/pull/4015)) @Kinglykrab 2024-01-25

### Commands

* Add `#npcedit set_grid [Grid ID]` to `#npcedit` ([#4004](https://github.com/EQEmu/Server/pull/4004)) @Kinglykrab 2024-01-22

### Crash Fix

* Fix crash when creating Frogloks/Drakkin ([#4016](https://github.com/EQEmu/Server/pull/4016)) @Kinglykrab 2024-01-25
* Reverting PR #3877 ([#3997](https://github.com/EQEmu/Server/pull/3997)) @fryguy503 2024-01-17

### Database

* Drop deprecated item_tick table ([#3977](https://github.com/EQEmu/Server/pull/3977)) @Akkadius 2024-01-14
* Drop item_tick if exists tweak in manifest ([#3985](https://github.com/EQEmu/Server/pull/3985)) @Akkadius 2024-01-15
* Increase max spawngroup name from 50 to 200 ([#3991](https://github.com/EQEmu/Server/pull/3991)) @Akkadius 2024-01-22

### Fixes

* Fix Mercenaries Buffs/Zoning Issues ([#4000](https://github.com/EQEmu/Server/pull/4000)) @Kinglykrab 2024-01-22
* Fix zone database update manifest ([#3972](https://github.com/EQEmu/Server/pull/3972)) @Kinglykrab 2024-01-13
* Fixes to zone idle while empty changes. ([#4006](https://github.com/EQEmu/Server/pull/4006)) @noudess 2024-01-23
* Reversed logic on InLiquid ([#3979](https://github.com/EQEmu/Server/pull/3979)) @fryguy503 2024-01-14

### Instances

* Convert Instance Quest Methods to Repositories ([#4012](https://github.com/EQEmu/Server/pull/4012)) @Kinglykrab 2024-01-25

### Logging

* Force Info category to be always on in file/console logs ([#3990](https://github.com/EQEmu/Server/pull/3990)) @Akkadius 2024-01-22

### Merchants

* Change database structure for merchant slots ([#3974](https://github.com/EQEmu/Server/pull/3974)) @joligario 2024-01-14

### Messages

* Fix disciple message added by previous patch. ([#3986](https://github.com/EQEmu/Server/pull/3986)) @noudess 2024-01-15

### Quest API

* QuestReward should now summon item to the inventory instead of the cursor. ([#3996](https://github.com/EQEmu/Server/pull/3996)) @regneq 2024-01-22

### Repositories

* Add `rank` to reserved words ([#3982](https://github.com/EQEmu/Server/pull/3982)) @Akkadius 2024-01-15
* Fix datetime zero-value save behavior ([#3976](https://github.com/EQEmu/Server/pull/3976)) @Akkadius 2024-01-14

### Spawn2

* Spawn condition value should default spawn_conditions value ([#3980](https://github.com/EQEmu/Server/pull/3980)) @noudess 2024-01-14

### Zoning

* Additional logs for zoning under instance checks ([#3989](https://github.com/EQEmu/Server/pull/3989)) @Akkadius 2024-01-22

* [Bug Fix] Limit Pet Taunt Distance (#4018)

* [Bug Fix] Limit pet taunt distance

Previously this was not regulated and allowed players to exploit unlimited taunt distance.

Rule Name: PetTauntRange
Rule Default: 150

Calculation is Rule Squared.

* Remove `this`

* [Bug Fix] Limit Player Taunt Distance (#4019)

* [Bug Fix] Player Taunt Distance

Previously this was not regulated on the server side and allowed players to exploit situations where the client did not enforce Z distance checks.

Rule Name: MaximumTauntDistance
Rule Default: 150

Calculation is Rule Squared

* remove `this`

* [Quests] Use separate variable for quest idle override. (#4026)

* [Quests] Use separate variable for quest idle override.

* Fix missing zone->

* [Crash Fix] Fix Possible Crash in HateList::Find (#4027)

# Notes
- We were not doing any pointer validation, so we were causing crashes in some cases.
- Example: http://spire.akkadius.com/dev/release/22.43.2?id=19163

* [Bug Fix] Fix issue in character_corpses Repository Query (#4029)

* [Bug Fix] Fix issue in character_corpses Repository Query

# Notes
- Query had an extra ` inside of it, causing it to fail.

* Update character_corpses_repository.h

* [API] Add lock_status method to world API (#4028)

* [Beacon] Cleanup Beacons Code (#4024)

# Notes
- Use constants where possible.
- Change `resist_adjust` parameter in `Beacon::AELocationSpell` from `resist_adjust` to `in_resist_adjust` so we're not possibly causing parameter shadowing.

* [Bots] Convert Bot Database Methods to Repositories (#4023)

* [Bots] Convert Bot Database Methods to Repositories

* Final push.

* Cleanup.

* Cleanup.

* Update bot_database.cpp

* Update bot_database.cpp

* Update bot_database.cpp

* Update bot_database.cpp

* Update bot_database.cpp

* [Spawn2] Convert Spawn2 Methods to Repositories (#4014)

* [Spawn2] Convert Spawn2 Methods to Repositories

# Notes
- Convert `CreateSpawn2()`, `GetCondition()`, `LoadSpawnConditions()`, `LoadSpawnEvent()`, `UpdateSpawnCondition()`, and `UpdateSpawnEvent()` to repositories.

# Images

* Update spawn2.cpp

* [Cleanup] Add Raid Loot Type Constants (#4022)

* [Cleanup] Add Raid Loot Type Constants

# Notes
- Add constants for Raid loot types.

* [Cleanup] Add Raid Loot Type Constants

# Notes
- Add constants for Raid loot types.

* [Commands] Cleanup #petitems Command (#4005)

- Adds support to `#petitems` to allow you to target bot's pets to view their items, defaults to your pet if you have one.
- If you have no pet or no bot pet targeted it won't function.

* [Merchants] Convert Merchant Load to Repositories (#4007)

* [Merchants] Convert Merchant Load to Repositories

# Notes
- Convert `GetMerchantDataForZoneLoad()` to repositories.

# Images
## Load

* Change to LoadMerchants()

* [Mercenaries] Add expansion settings update to Mercs:Enable (#4001)

# Notes
- Adds an expansion settings update to the `Mercs:Enable` command, only updates if the expansion setting isn't already `-1` or doesn't already contain the bitmask for Seeds of Destruction (16384).
- This will enable Mercenary Liaisons spawning properly in Plane of Knowledge for the hiring of mercenaries.

* [Alternate Currency] Convert Load of Alternate Currencies to Repositories (#3993)

# Notes
- Convert `LoadAlternateCurrencies()` to repositories.

* [Traps] Convert Load/Set of Traps to Repositories (#3994)

# Notes
- Convert `LoadTraps()` and `SetTrapData()` to repositories.

* [Bug Fix] Fix NPC After Death Emotes (#4021)

* [Bug Fix] Fix NPC After Death Emotes

- `DoNPCEmote` was being called on the corpse, not the NPC, so it wasn't working for some reason despite it working for years.
- Cleaned up some other logic and variable names in `NPC::Death` while I was in there.

* Update attack.cpp

* Update npc.cpp

* Update attack.cpp

* Update attack.cpp

* [Pets] Convert Load of Pets Beastlord Data to Repositories (#3995)

* [Pets] Convert Load of Pets Beastlord Data to Repositories

# Notes
- Convert `GetBeastlordPetData()` to repositories.
- Add support for `unsigned` versions of `float`, `double`, and `decimal`, without this we defaulted to `std::string`, such as with `pets_beastlord_data`.

* Update repository-generator.pl

---------

Co-authored-by: Chris Miles <akkadius1@gmail.com>

* [Rules] Add rules for cross-zone/world-wide casts to affect Bots/Mercenaries/Pets (#4002)

* [Rules] Add rules for cross-zone/world-wide casts to affect bots/mercenaries/pets

# Notes
- These rules allow operators to have cross-zone/world-wide casts/removals of spells affect bots, mercenaries, and/or pets.
- Adds `World:AllowWorldWideSpellsOnBots`.
- Adds `World:AllowWorldWideSpellsOnMercs`.
- Adds `World:AllowWorldWideSpellsOnPets`.
- Adds `Zone:AllowCrossZoneSpellsOnBots`.
- Adds `Zone:AllowCrossZoneSpellsOnMercs`.
- Adds `Zone:AllowCrossZoneSpellsOnPets`.

* Consolidate to 3 rules

* [Cleanup] Cleanup cross-zone/world-wide OPCode handling (#4003)

* [Cleanup] Cleanup cross-zone/world-wide OPCode handling

# Notes
- Cleans up the logic greatly for cross-zone/world-wide methods since we were doing extraneous status checks and needlessly allocating memory for variables.

* Update worldserver.cpp

* [Grids] Convert Grid/Grid Entries to Repositories (#4011)

* [Grids] Convert Grid/Grid Entries to Repositories

- Convert `AddWaypoint()`, `AddWaypointForSpawn()`, `DeleteWaypoint()`, `GetHighestWaypoint()`, `GetRandomWaypointFromGrid()`, `GridExistsInZone()`, and `ModifyGrid()` to repositories.

* Update grid.cpp

* Update questmgr.cpp

* Update waypoints.cpp

* Update waypoints.cpp

* [Hotfix] Fix database loading routines (#4030)

* [Zone] Convert Fishing/Foraging to Repositories (#4008)

* [Zone] Convert Fishing/Foraging to Repositories

# Notes
- Convert `LoadFishing()` and `LoadForage()` to repositories.

* Update forage.cpp

* Cleanup

* [Bots] Missing boolean returns on DeletePetStats and SaveInspectMessage (#4031)

* [Bug Fix] Patch for recent change to DEATH (#4032)

* [Bug Fix] spawn_conditions map was being emptied by mistake (#4033)

* [Release] 22.43.3 (#4034)

### API

* Add lock_status method to world API ([#4028](https://github.com/EQEmu/Server/pull/4028)) @Akkadius 2024-01-29

### Alternate Currency

* Convert Load of Alternate Currencies to Repositories ([#3993](https://github.com/EQEmu/Server/pull/3993)) @Kinglykrab 2024-01-29

### Beacon

* Cleanup Beacons Code ([#4024](https://github.com/EQEmu/Server/pull/4024)) @Kinglykrab 2024-01-29

### Bots

* Convert Bot Database Methods to Repositories ([#4023](https://github.com/EQEmu/Server/pull/4023)) @Kinglykrab 2024-01-29
* Missing boolean returns on DeletePetStats and SaveInspectMessage ([#4031](https://github.com/EQEmu/Server/pull/4031)) @joligario 2024-01-30

### Code

* Add Raid Loot Type Constants ([#4022](https://github.com/EQEmu/Server/pull/4022)) @Kinglykrab 2024-01-29
* Cleanup cross-zone/world-wide OPCode handling ([#4003](https://github.com/EQEmu/Server/pull/4003)) @Kinglykrab 2024-01-29

### Commands

* Cleanup #petitems Command ([#4005](https://github.com/EQEmu/Server/pull/4005)) @Kinglykrab 2024-01-29

### Crash Fix

* Fix Possible Crash in HateList::Find ([#4027](https://github.com/EQEmu/Server/pull/4027)) @Kinglykrab 2024-01-28

### Fixes

* Fix NPC After Death Emotes ([#4021](https://github.com/EQEmu/Server/pull/4021)) @Kinglykrab 2024-01-29
* Fix database loading routines ([#4030](https://github.com/EQEmu/Server/pull/4030)) @Akkadius 2024-01-29
* Fix issue in character_corpses Repository Query ([#4029](https://github.com/EQEmu/Server/pull/4029)) @Kinglykrab 2024-01-29
* Limit Pet Taunt Distance ([#4018](https://github.com/EQEmu/Server/pull/4018)) @fryguy503 2024-01-26
* Limit Player Taunt Distance ([#4019](https://github.com/EQEmu/Server/pull/4019)) @fryguy503 2024-01-26
* Patch for recent change to DEATH ([#4032](https://github.com/EQEmu/Server/pull/4032)) @noudess 2024-01-30
* spawn_conditions map was being emptied by mistake ([#4033](https://github.com/EQEmu/Server/pull/4033)) @noudess 2024-01-30

### Grids

* Convert Grid/Grid Entries to Repositories ([#4011](https://github.com/EQEmu/Server/pull/4011)) @Kinglykrab 2024-01-29

### Mercenaries

* Add expansion settings update to Mercs:Enable ([#4001](https://github.com/EQEmu/Server/pull/4001)) @Kinglykrab 2024-01-29

### Merchants

* Convert Merchant Load to Repositories ([#4007](https://github.com/EQEmu/Server/pull/4007)) @Kinglykrab 2024-01-29

### Pets

* Convert Load of Pets Beastlord Data to Repositories ([#3995](https://github.com/EQEmu/Server/pull/3995)) @Kinglykrab 2024-01-29

### Quests

* Use separate variable for quest idle override. ([#4026](https://github.com/EQEmu/Server/pull/4026)) @noudess 2024-01-27

### Rules

* Add rules for cross-zone/world-wide casts to affect Bots/Mercenaries/Pets ([#4002](https://github.com/EQEmu/Server/pull/4002)) @Kinglykrab 2024-01-29

### Spawn2

* Convert Spawn2 Methods to Repositories ([#4014](https://github.com/EQEmu/Server/pull/4014)) @Kinglykrab 2024-01-29

### Traps

* Convert Load/Set of Traps to Repositories ([#3994](https://github.com/EQEmu/Server/pull/3994)) @Kinglykrab 2024-01-29

### Zone

* Convert Fishing/Foraging to Repositories ([#4008](https://github.com/EQEmu/Server/pull/4008)) @Kinglykrab 2024-01-30

* [Bug Fix] Fix Issue with Bot Dual wield (#4037)

# Notes
- Bots were using primary weapons even for dual wield attacks so they were never attacking with their secondary even when they should be.

* [Bug Fix] Fix Bot Non-Melee Damage Messages (#4038)

# Notes
- These were not displaying because bots pass the `attacker && attacker->GetOwner()` check which assumes they're a pet because we weren't confirming it wasn't a bot.

# Image

* [Feature] Add support to crosszone/worldwide spells to affect bot pets  (#4036)

* [Bug Fix] Move break in ServerOP_WWSpell handler

# Notes
- This break was cancelling loop early, m

* [Feature] Add support to crosszone/worldwide spells to affect bot pets

* [Bot Commands] Separate Bot Commands into Individual Files (#4035)

# Notes
- Separate all bot commands into individual files like regular commands.

# Images

* [Objects] Add `fix_z` column to ground spawns (#3992)

* [Objects] Add is_floating column to objects/ground spawns

# Notes
- Allows ground spawns/objects to float without having `FixZ()` called.

* Remove from object.

* Database version

* Fix

* Change to fix_z

* [Bug Fix] Fix for potential crash of DS damage on death (#4040)

On the unfortunate timing of a bot or owner dying when the bot deals damage due to a DS and the owner pointer is no longer valid.

* [Cleanup] Remove redundant check in Object::HandleCombine (#4041)

Some minor formatting updates.

* [Factions] Remove from shared memory and simplify (#3999)

* [Factions] Remove from shared memory and simplify

- Removes factions from shared memory and moves to zone based storage of repositories and changes the NPC `faction_list` to also use repositories.
- This affects NPC Factions and Faction Associations.

* Bug fixes.

* Update client.cpp

* Update client.cpp

* Update client.cpp

* Cleanup

* Update client.cpp

* Update client.cpp

* Update client.cpp

* Final push

* Update CMakeLists.txt

* Consolidate reloading.

* [Cleanup] PR # 3999 (#4039)

* [Fixes for PR # 3999

* [Reload actual in game factions, not just the umbrella data.

* syntax

* Fix typo

* Foix bug where primary_faction not filled in when no hits

* Fix typos

* Fix splash factions for kills.

* Fix typo

* Fix more variable names to be accurate

* Fix Loads to load new ones as they come in.

* Load npc_factions without primary (tasks) and support old task faction

* Rename to make way for new LoadFactionAssocition (by faction_id)

* Fix some review comments

* Add code to load factions for splash tasks and quests.

* Fix issue with sign and RewardFaction, fix Log Message

---------

Co-authored-by: Paul Coene <noudess@gmail.com>

* [GM Commands] Fix typo in #rules help. (#4042)

* [Quest API] Add GetAAEXPPercentage() and GetEXPPercentage() to Perl/Lua (#4044)

* Initial Push

* Push

* Push.

* [Commands] Add #show special_abilities (#4043)

* [Commands] Add #show special_abilities

# Notes
- Allows operators to see what special abilities an NPC has.
- Move special ability values to `common/emu_constants.h`.
- Add `EQ::constants::GetSpecialAbilityMap()` and `EQ::constants::GetSpecialAbilityName()`.
- Add `NPC::DescribeSpecialAbilities(client)` to describe special abilities to a specified client.

# Images

* Update npc.cpp

* [Loot] Remove from shared memory, simplification (#3988)

* First pass of pulling loot out of shared memory, functional

* More code cleanup

* More cleanup

* More cleanup

* More cleanup

* Add loot reload type

* Reload, logging

* Update npc.h

* Cleanup

* Logging, don't load attempt to load loottable id 0

* Update worldserver.cpp

* Update client.cpp

* Update zone_loot.cpp

* PR feedback

* Update zone.cpp

* Memory leak suggestion

* Update CMakeLists.txt

* Post rebase issues

* [Feature] Add optional `is_forced` parameter to Zone::Repop (#4046)

* [Feature] Add optional `is_force` parameter to Zone::Repop

# Perl
- Add `quest::repopzone(is_force)`.

# Lua
- Add `eq.repop_zone(is_force)`.

# Commands
- Cleanup `#repop` to use new parameter in `Zone::Repop`.

# Notes
- Allows operators to forcefully repop a zone without using a second method to clear the respawn timers.

* is_forced

* Update repop.cpp

* Update repop.cpp

* [Base Data] Remove from shared memory and simplify (#4045)

* [Base Data] Remove from shared memory and simplify

- Removes Base Data loading from shared memory and puts it into zone.
- Changes type of `level` and `class` to `uint8_t` from `uint32_t` for consistency since we're renaming fields here anyway.
- Renames `unk1` to `hp_regen` in `base_data` table.
- Renames `unk2` to `end_regen` in `base_data` table.
- These changed fields were already mapped, we just hadn't renamed them for whatever reason.
- Regenerates Base Data repository.
- Adds `#reload base_data` to reload base data in real time.

* Cleanup

* Update shareddb.h

* Cleanup.

* Update shareddb.cpp

* Update main.cpp

* [Database] Correct manifest migration entries that should be content (#4047)

* [Quests] Cleanup Quest Parser Logic (#4025)

* [Quests] Cleanup Quest Parser Logic

# Notes
- Consolidate duplicated code into loops to make it easier to read and easier to add on to.

# Images

* Update quest_parser_collection.cpp

* Push

* Push

* Update embperl.cpp

* Push

* Additional cleanup, use File::Exists utility

* Range based loops

* Update embparser.cpp

* Cleanup

* Update embparser.cpp

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>

* [Feature] Corpse Overhaul (#3938)

# Corpse Overhaul

Changelog:

- Player corpses now have two timers, one specific to the rezability of the corpse and the other to cover the overall rot timer of the player corpse.
- The rezability timer is based on the online presence of the player/account and is not affected by being offline.
- The rot timer is not affected by offline/online status and will count to the rot status of the corpse.
- Corpses can be rezzed multiple times, however only the first rez that yeilds returned xp will be counted. Not other rez will return any xp. This allows for a "Poor mans COTH" as was used many times in the early eras.
- All Corpse class private/protected member variables are all now prefixed with m_
- Added Corpses logging category along with many debug logs
- Removed LoadCharacterCorpseData
- Removed LoadCharacterCorpseEntity
- Added LoadCharacterCorpse(const CharacterCorpsesRepository::CharacterCorpses, const glm::vec4 &position) which simplifies areas of consumption and reduces double queries from removing LoadCharacterCorpseData and replacing LoadCharacterCorpseEntity
- All parameters that were prefixed with in_ have been dropped
- Removed two queries from CheckIsOwnerOnline and have it query the world's CLE by account_id since that is how live works
- Regenerated repository character_corpses
- Cleaned up many list iterators to use range based for loops
- Rate limit Corpse::Process m_is_rezzable with a 1 second check timer
- General code cleanup
- Added a Server Up check to bury all corpses in instances to prevent lost corpses if an instance is released during server down. This facilitates player recovery via shadowrest or priests of luclin.


This PR also now fixes a long standing issue with HasItem performance in our script plugins. It is significantly faster, we will need to coordinate quest changes and comms with operators.

```lua
    if ($client->HasItemOnCorpse($item_id)) {
        return 1;
    }
```

```lua
    --corpse
    if self:HasItemOnCorpse(itemid) then
        return true
    end
```


Testing Completed:

- Create a Corpse
- Standard rezzing
- Ghetto Coth (No Extra XP)
- Rezzing after graveyard move
- Divine Rez works as intended
- No XP Rez (Corpse Call) does not give XP
- Corpse Burying
- Cross Instance Graveyard Corpse movement/Rezzing
- DZ End/Quit Corpse Movement/Rezzing
- Server Shutdown/Reinit DZ Corpse Movement/Rezzing


---------

Co-authored-by: Akkadius <akkadius1@gmail.com>

* [Bug Fix] Fix Froglok Starting Languages (#4050)

# Notes
- Switch was using the wrong race ID.

* [Feature] Classic Taunt (Pre 2006) style of taunt (#3942)

* DRAFT - Classic Taunt (Pre 2006) style of taunt

RULE: ClassicTauntSystem

Completely seperate logic for each system. Could potentially be re-writte to be more inline but there are a good bit of minor differences.

* Consolidate Logic

Still needs in-game testing

* Feedback Request

* Updates per feedback

* [Deprecation] Remove eqemu_server.pl script and ties to server (#4049)

* [Tasks] Send active elements in task select packet (#4051)

Only the first element was being serialized to show the start zone of
tasks. This was resulting in a blank description for tasks that only
have element descriptions.

Live sends all initial active elements for the task when sending this
packet. Any bracket text with these elements as a requirement will be
appended to the description.

* [Tasks] Avoid removing client tasks from memory on load (#4052)

If a task was deleted or had new elements added to it without updating
character states to match changes, client state for the task was not
loaded into memory and a "contact a GM" warning was sent to the client.

This caused an issue if a client later accepted a new task because it
could be placed in the same client state slot as a non-loaded task. The
table does not have constraints so this was also inserted into the db.

The next time client task state was reloaded after zoning, the new task
would not be loaded since it occupied a used slot, even though that used
slot was also not being loaded. The client could not remove or reacquire
the original task without GM intervention and an entry was left in the
db for the new task.

This makes the following changes to client task state loading:

 - If a task id no longer exists it is deleted from client state tables
   instead of only being removed from memory.

 - If a task occupies the same client state slot as another task, it is
   deleted from client state tables instead of being ignored.

 - If new elements have been added to a task, client state will keep the
   task in memory. The new activity states will be inserted into the db
   when necessary for updates (may not be immediate).

These changes also fix two smaller bugs as a consequence:

 - If a character was at the 20 quest limit the last quest wasn't being
   processed for activity count changes. The task would continue to show
   to clients but any added new elements couldn't be completed.

 - Deleted tasks that occupied slot 0 in client state would fallback to
   loading it as a solo task of type 0. This prevented a client's real
   solo task from being loaded if the deleted task was processed first.

Note clients may receive or lose credit for completed elements if new
ones are added in the middle of tasks. Server ops will still need to
update character state tables manually on task changes to prevent this.

* [Cleanup] Convert Quest Ornament Methods to Repositories (#4048)

# Notes
- Convert `Client::SetPrimaryWeaponOrnamentation` and `Client::SetSecondaryWeaponOrnamentation` to repositories.

* [Feature] Add RoF2 Guild features (#3699)

* [Feature] Add additional Guild Features

This adds the following guild features and design pattern
- the existing guild system was used
- guild features are based on RoF2 within source with translaters used to converted between client differences
- backward compatible with Ti and UF, and allows for mixed client servers
- Guild Back for Ti and UF is based on RoF2 Permissions for banking if Guild Leader does not use Ti/UF
- Guild Ranks and Permissions are enabled.
- Guild Tributes are enabled.
- Event logging via rules for donating tribute items and plat
- Rules to limit Guild Tributes based on max level of server
- Rewrote guild communications to client using specific opcodes
-- Server no longer sends a guild member list on each zone
-- Guild window is updated when a member levels, rank changes, zone changes, banker/alt status using individual opcodes
-- When a member is removed or added to a guild, a single opcode is sent to each guild member
-- This reduces network traffic considerably

Known issues:
- Visual bug only. Guild Tributes window will display a 0 for level if tribute is above max level rule setting.
- Visual bug only. Guild Mgmt Window will not display an online member if the player has 'show offline' unchecked and a guild member zones within the Notes/Tribute tab.  This is resolved by selecting and de-selecting the 'Show Offline' checkbox.

* Updated RoF2 Guild Comms

Updated RoF2 Guild Comms
Update RoF2 Opcodes
Rewrote RoF2 Guild Communications using specific opcodes.
Added database changes - they are irreversible

* Formatting

* Update base_guild_members_repository.h

* Format GuildInfo

* Format GuildAction enum

* Formatting in clientlist

* quantity vs quantity

* desc vs description

* Format structs

* Inline struct values

* Formatting

* Formatting

* Formatting fixes

* Formatting items

* Formatting

* Formatting

* struct formatting updates

* Updated formatting

* Updated
- std:string items
- naming conventions
- magic numbers

* Repo refactors
Other formatting updates

* Remove test guild commands

* Updated #guild info command

* Add new repo methods for Neckolla ReplaceOne and ReplaceMany

* Fix guild_tributes repo

* Update database_update_manifest.cpp

* Phase 1 of final testing with RoF2 -> RoF2.
Next phase will be inter compatibility review

* Remove #guild testing commands

* Fix uf translator error
Rewrite LoadGuilds

* Use extended repository

* FIx guild window on member add

* LoadGuild Changes

* Update guild_base.cpp

* Few small fixes for display issue with UF

* Update guild_base.cpp

* Update guild_members_repository.h

* Update zoneserver.cpp

* Update guild.cpp

* Update entity.h

* Switch formatting

* Formatting

* Update worldserver.cpp

* Switch formatting

* Formatting switch statement

* Update guild.cpp

* Formatting in guild_base

* We don't need to validate m_db everywhere

* More formatting / spacing issues

* Switch format

* Update guild_base.cpp

* Fix an UF issue displaying incorrect guildtag as <>

* Updated several constants, fixed a few issues with Ti/UF and guild tributes not being removed or sent when a member is removed/disbands from a guild.

* Formatting and logging updates

* Fix for Loadguilds and permissions after repo updates.

* Cleanup unnecessary m_db checks

* Updated logging to use player_event_logs

* Updated to use the single opcodes for guild traffic for Ti/UF/RoF2.  Several enhancements for guild functionality for more reusable code and readability.

* Update to fix Demote Self and guild invites declining when option set to not accept guild invites

* Potential fix for guild notes/tribute display issues when client has 'Show Offline' unchecked.

* Updates to fox recent master changes

Updates to fix recent master changes

* Updates in response to comments

* Further Updates in response to comments

* Comment updates and refactor for SendAppearance functions

* Comment updates

* Update client spawn process for show guild name

Add show guild tag to default spawn process

* Update to use zone spawn packets for RoF2
Removed several unused functions as a result
Updated MemberRankUpdate to properly update guild_show on rank change.
Updated OP_GuildURLAndChannel opcode for UF/RoF2

* Cleanup of world changes
Created function for repetitive zonelist sendpackets to only booted zones
Re-Inserted accidental delete of scanclosemobs

* Fixes

* Further world cleanup

* Fix a few test guild bank cases for backward compat
Removed a duplicate db call
Fixed a fallthrough issue

* Update guild_mgr.cpp

* Cleanup

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>

* [Hotfix] fs::exists(fs::path{name}) does not work for Chinese characters in windows

* Revert "[Hotfix] fs::exists(fs::path{name}) does not work for Chinese characters in windows"

This reverts commit 801025c1663c6a077557f2c4cc446b9501f9ba18.

* [Crash Reporting] Update Spire to use SSL (#4055)

* [Release] 22.44.0 (#4056)

* [Release] 22.44.0

* Update CHANGELOG.md

* [File] Fix File::Exists(file_name) to be resilient to Chinese characters (#4058)

* Update file.cpp

* Update file.cpp

* Update file.cpp

* Update file.cpp

* Update file.cpp

* Update file.cpp

* Update file.cpp

* Update file.cpp

* Final fix

* [Release] 22.44.1

* [Guilds] Clean up `GUILD_RANK_NONE` references (#4059)

Should be exhaustive for guild rank values
Cleans up redefinition of `GUILD_RANK_NONE` by including `GUILD_RANK_NONE_TI`
Fixes #4057

* [Database] Fix default value for `time_of_death` in `character_corpses` (#4060)

* [Database] Fix default value for `time_of_death` in `character_corpses`

* Extra `NULL`

* Update repository

* Repositories with updated structure this time

* [Database] Proper default for `droptime` from `object_contents` (#4061)

* [Database] Fix table name in manifest (#4063)

* [Fix] Guard against crash condition (#4062)

* [Cleanup] Use explicit conversions for enum formatting (#4064)

This is prep for updating to fmt 10 which removed implicit conversions
for enums.

* [Bots] Remove Alt Combat Functionality (#4067)

* [Bots] Remove Alt Combat Functionality

# Notes
- This functionality needlessly complicates bot targeting logic and causes crashes and unintended behavior for players when accidentally enabled or enabled by default.

* Cleanup

* [Release] 22.44.2 (#4068)

* [Bug Fix] Fix Issue with ClearSpawnTimers() (#4070)

# Notes
- We were using the improper ID for this and not checking if the vector was empty before using.

* [Release] 22.44.3 (#4072)

### Fixes

* Fix Issue with ClearSpawnTimers() ([#4070](https://github.com/EQEmu/Server/pull/4070)) @Kinglykrab 2024-02-13

* [Hotfix] Fix ClearSpawnTimers() (#4073)

# Notes
- This wasn't a part of my other pull request.
- We were clearing `spawn2_list` before using it in `ClearSpawnTimers()`.

* [Release] 22.44.4 (#4074)

### Fixes

* Fix ClearSpawnTimers() ([#4073](https://github.com/EQEmu/Server/pull/4073)) @Kinglykrab 2024-02-13

* [Hotfix] Fix issues where we're using the wrong database pointers

* [Quest API] Add IsInAGuild() to Perl/Lua (#4066)

# Perl
- Add `$client->IsInAGuild()`.

# Lua
- Add `client:IsInAGuild()`.

# Notes
- Allows operators to more accurately tell if a player is in a group.
- `GuildID()` returns `uint32` max value if the player isn't in a guild so conditions using it must check for a value over a certain point, this is just a bool that simplifies that logic.

* [Opcodes] Fix opcode reloading (#4075)

* [Bug Fix] Fix #wpadd Query (#4078)

# Notes
- `GetNextWaypoint()` was getting a null value and crashing in `Strings::ToInt()`.

* [Bug Fix] Fix ObjectContentsRepository using content_db (#4076)

# Notes
- `*this` was using content database, causing this not to work on servers using sharded databases.

* [Bug Fix] Fix fix_z Query (#4080)

# Notes
- This query was not working properly due to using backticks instead of single quotes.

* [Bug Fix] Fix manifest check on `base_data` change (#4082)

* [Database] Remove "item_tick" from database schema per https://github.com/EQEmu/Server/pull/3985 (#4083)

* [Repositories] Convert Zone Flags to Repositories (#4077)

# Notes
- Converts `ClearZoneFlag()`, `LoadZoneFlags()`, and `SetZoneFlag()` to repositories.

* [Quest API] Add tracebacks to Lua error messages (#4079)

This adds an error msg handler for lua calls to add a stack trace to
error messages. Lua 5.1 does not have luaL_traceback like luajit and lua
5.2+ so debug.traceback() is used directly as the msg handler.

The traceback will add more detail to errors than just logging package
and event names. Exceptions in C++ binds and luabind errors will now
show script context instead of just the error message.

e.g., for a luabind overload error:

  No matching overload found, candidates:
  void signal(int,int,int)
  void signal(int,int)
  stack traceback:
    [C]: in function 'signal'
    quests/arena/player.lua:10: in function 'somefn'
    quests/arena/player.lua:27: in function <quests/arena/player.lua:17>

* [Code] Update fmt to 10.2.1 (#4071)

This fixes MSVC compile warnings for stdext::checked_array_iterator
which were deprecated in STL for VS 2022 17.8:

https://github.com/microsoft/STL/wiki/Changelog#vs-2022-178

* [Bug Fix] Update database_schema to add guild_permissions (#4085)

* Update database_schema to add guild_permissions

* Reordered

* [Feature] Hot Zone Bonus XP Notice (#4091)

When in Hotzones, a bonus XP notice will let players know the hotzone is enabled.

* [Bug Fix] Aura effect spell id from #3964 (#4094)

Auras were trying to cast another aura spell vice the spell effect

* [Bug Fix] Fix issue with IsEntOnHateList (#4097)

# Notes
- We were not validating pointer in `IsEntOnHateList()`.

* [Bots] Cleanup empty `bot_commands` files (#4095)

* [Bots] Cleanup empty `bot_commands` files

# Notes
- These files were part of the conversion of bot commands to individual files, these commands are part of overarching commands and therefore do not have their own files.
- These were not removed when initially committed.

* Update bot_command.cpp

* Update bot_command.cpp

* [Bug Fix] Fix Sympathetic Procs for Bots/Mercenariess (#4086)

# Notes
- Bots and Mercenaries were being rejected at the top of this method despite us allowing them to use this method where it's called.

* [Quest API] Add spell cast methods to Lua (#4096)

# Notes
- Add `eq.cast_spell(spell_id)` and `eq.self_cast(spell_id)` to Lua.
- Lua did not have a `quest::castspell(spell_id)` or `quest::selfcast(spell_id)` equivalent, so this adds them.

* [Quest API] Add Timer Events to Perl/Lua (#4099)

* [Quest API] Add Timer Events to Perl/Lua

# DRAFT

* Cleanup

* [Quest API] Add Entity Variable Events to Perl/Lua (#4092)

* [Quest API] Add Entity Variable Events to Perl/Lua

- Add `EVENT_ENTITY_VARIABLE_DELETE`.
- Add `EVENT_ENTITY_VARIABLE_SET`.
- Add `EVENT_ENTITY_VARIABLE_UPDATE`.
- All export `$variable_name` and `$variable_value`.

- Add `event_entity_variable_delete`.
- Add `event_entity_variable_set`.
- Add `event_entity_variable_update`.
- All export `e.variable_name` and `e.variable_value`.

- Allows operators to perform operations when entity variables are cleared, deleted, set, or updated.

* Update mob.cpp

* Cleanup.

* Cleanup

* Update mob.cpp

* Update lua_general.cpp

* Update embparser_api.cpp

* [Expansions] Zone Expansion Version Routing (#4084)

* Expansion version routing

* CheckForImproperContentFiles rule

* Update world_content_service.cpp

* Update client.cpp

* Update client.cpp

* Update CheckForImproperContentFiles

* Remove nek pok check

* Remove file checking

* Remove

* Command and dev tools menu tweaks

* Update world_content_service.cpp

* Update world_content_service.cpp

* Update version path

* Update content_filter_criteria.h

* Update content_filter_criteria.h

* Update quest_parser_collection.cpp

* Update comments

* PR feedback

* Update client_packet.cpp

* Remove notes column for display cleanliness

* [Repositories] Cleanup and Convert Character Creation to Repositories (#4053)

* [Repositories] Cleanup and Convert Character Creation to Repositories

# Notes
- Converts `Database::GetCharacterID()`, `Database::SaveCharacterCreate()`, and `Client::OPCharCreate` to repositories.
- Cleanup a spot we were doing a queries in a loop.

* Cleanup

* Update database.cpp

* Update database.cpp

* [Logs] Fix log in BaseGuildManager::IsGuildLeader() (#4102)

Looks like typos created invalid escapes

* [Bug Fix] Revert 2df7d19 (#4101)

* [Bug Fix] Revert https://github.com/EQEmu/Server/commit/2df7d19f975cb21dd4eb7d6c7d40656cf58ed138
This change breaks lich-type spells as seen in #4098. Per comment on original change, also don't see where Runes come into play.

* Revert invis change

* [Bug Fix] Correct Rune damage check location for invis break.

Correct the location of the CommonBreakInvis for runes. Appologize for the incorrect location. Thank you JJ for pointing me to the PR that caused the issue.

---------

Co-authored-by: Trust <fryguy503@gmail.com>

* [Factions] Fix issue with npcedit and cached factions (#4103)

* [Factions] Fix issue with npcedit and cached factions

* Load no matter what

* [Database] Add content_database flag for zone changes (#4104)

* [Bug Fix] Add safety check to SummonAllCharacterCorpses. (#4107)

Should prevent an empty vector from being passed to the repository.

* [Feature] Add Augments to Starting Items for Bots/Players (#4100)

* [Feature] Add Augments to Starting Items for Bots/Players

- Adds support for augments to `bot_starting_items` and `starting_items`.
- Will allow operators to kit bots/players out with augmented gear from the start if they so choose.

* Update database_update_manifest.cpp

* Update client.cpp

* [Quest API] Add Hatelist Count Methods to Perl/Lua (#4106)

# Perl
- Add `$mob->GetHateListCount()`.# Perl
- Add `$mob->GetHateListCount()`.
- Add `$mob->GetHateListBotCount()`.
- Add `$mob->GetHateListClientCount()`.
- Add `$mob->GetHateListNPCCount()`.

# Lua
- Add `mob:GetHateListCount()`.
- Add `mob:GetHateListBotCount()`.
- Add `mob:GetHateListClientCount()`.
- Add `mob:GetHateListNPCCount()`.

# Notes
- Allows operators to more easily get a total entity count of a Mob's hate list, can do an overall count, or specifically bots, clients, or NPCs.

* [Bug Fix] Added additional Guild-related crash checks (#4105)

* [Bug Fix] Fix hotzone string error (#4109)

The Strings entry was from a newer client. Moved text to a raw message.

* [Repositories] Update `zone` base repository from #4084 (#4111)

* [Beacon] Revert a few lines of PR #4024 that broke beacons (#4118)

* [Bug Fix] Crash on Ubuntu 22.04 (#4119)

Ubuntu 22.04 as of Feb 25 2024 was crashing when sending guild tributes on zone in.  Issue was caused by an overrun on string copies.
Updated to use strn0cpy, crash was resolved.

* [Guilds] Fixes for Guild Bank (#4120)

Updates guild bank functionality
- Allows QTY 100 in guild bank
- Removes bug when deposit area is full and a UF or RoF2 client attempts to deposit another item
- Attempt to deposit a nodrop item in RoF2 creates a dupe situation

* [Quest API] Add Pet Methods to Perl/Lua (#4116)

* [Quest API] Add Pet Methods to Perl/Lua

# Perl
- Add `$mob->IsAnimation()`.
- Add `$mob->IsCharmed()`.
- Add `$mob->IsFamiliar()`.
- Add `$mob->IsTargetLockPet()`.

# Lua
- Add `mob:IsAnimation()`.
- Add `mob:IsCharmed()`.
- Add `mob:IsFamiliar()`.
- Add `mob:IsTargetLockPet()`.

# Notes
- These methods were not exported and could be useful for operators.

* Update perl_mob.cpp

* [Quest API] Add GetNPCSpellsEffectsID() to Perl/Lua (#4117)

# Perl
- Add `$npc->GetNPCSpellsEffectsID()`.

# Lua
- Add `npc:GetNPCSpellsEffectsID()`.

# Notes
- Allows operator's to get an NPC's spell effects ID.

* [Quest API] Add GetAugmentIDs() to Perl/Lua (#4114)

# Perl
- Add `$questitem->GetAugmentIDs()`.

# Lua
- Add `iteminst:GetAugmentIDs()`.

# Notes
- Allows operators to get a list of augment IDs from an item instance directly without using the inventory method.

* [Quest API] Add Bot Methods to Perl/Lua (#4113)

* [Quest API] Add Bot Methods to Perl/Lua

# Perl
- Add `quest::GetBotClassByID(bot_id)`.
- Add `quest::GetBotGenderByID(bot_id)`.
- Add `quest::GetBotIDsByCharacterID(character_id)`.
- Add `quest::GetBotIDsByCharacterID(character_id, class_id)`.
- Add `quest::GetBotLevelByID(bot_id)`.
- Add `quest::GetBotNameByID(bot_id)`.
- Add `quest::GetBotRaceByID(bot_id)`.

# Lua
- Add `eq.get_bot_class_by_id(bot_id)`.
- Add `eq.get_bot_gender_by_id(bot_id)`.
- Add `eq.get_bot_ids_by_character_id(character_id)`.
- Add `eq.get_bot_ids_by_character_id(character_id, class_id)`.
- Add `eq.get_bot_level_by_id(bot_id)`.
- Add `eq.get_bot_name_by_id(bot_id)`.
- Add `eq.get_bot_race_by_id(bot_id)`.

# Notes
- Allows operators to get a list of a player's bot IDs, get a bot's class, gender, level, name, and race.

* Update bot_database.cpp

* [Bug Fix] Fix Bot Weapons with No Races (#4110)

# Notes
- Bot weapons that have no races were not causing damage and saying the target was invulnerable because we were not checking the `Bots:AllowBotEquipAnyRaceGear` rule.

* [Quest API] Export Combat Record to Death Events (#4112)

# Perl
- Add `$combat_start_time`, `$combat_end_time`, `$damage_received`, and `$healing_received` to death events for NPCs.

# Lua
- Add `e.combat_start_time`, `e.combat_end_time`, `e.damage_received`, and `e.healing_received` to death events for NPCs.

# Notes
- Allows operators to hook in to the combat record logic so they can log the start and end …
xackery added a commit to jamfesteq/server that referenced this pull request Apr 13, 2024
* [Release] 22.42.0 (#3970)

### AAs

* Convert Loading of AAs to Repositories ([#3963](https://github.com/EQEmu/Server/pull/3963)) @Kinglykrab 2024-01-13

### Auras

* Convert Get of Auras to Repositories ([#3964](https://github.com/EQEmu/Server/pull/3964)) @Kinglykrab 2024-01-13

### Character

* Character EXP Modifiers in Memory ([#3934](https://github.com/EQEmu/Server/pull/3934)) @Kinglykrab 2024-01-13
* Convert Character Corpses to Repositories ([#3941](https://github.com/EQEmu/Server/pull/3941)) @Kinglykrab 2024-01-13
* Convert Save of Character Languages to Repositories ([#3948](https://github.com/EQEmu/Server/pull/3948)) @Kinglykrab 2024-01-12

### Code

* Cleanup AddCash() and RemoveCash() NPC Methods ([#3957](https://github.com/EQEmu/Server/pull/3957)) @Kinglykrab 2024-01-12
* Cleanup ChangeSize() ([#3959](https://github.com/EQEmu/Server/pull/3959)) @Kinglykrab 2024-01-12
* Cleanup Owner Related Mob Methods ([#3960](https://github.com/EQEmu/Server/pull/3960)) @Kinglykrab 2024-01-13
* Cleanup RandomizeFeatures() ([#3958](https://github.com/EQEmu/Server/pull/3958)) @Kinglykrab 2024-01-12
* Remove GroupCount() and RaidGroupCount() ([#3943](https://github.com/EQEmu/Server/pull/3943)) @Kinglykrab 2024-01-13
* Remove unused Grid methods ([#3944](https://github.com/EQEmu/Server/pull/3944)) @Kinglykrab 2024-01-13

### Commands

* Convert NPC Spawn Methods to Repositories ([#3956](https://github.com/EQEmu/Server/pull/3956)) @Kinglykrab 2024-01-13

### Crash Fix

* Character Creation Class/Race out of Range. ([#3920](https://github.com/EQEmu/Server/pull/3920)) @fryguy503 2024-01-09

### Feat

* Alt Sinister Strike Formula ([#3921](https://github.com/EQEmu/Server/pull/3921)) @fryguy503 2024-01-09

### Feature

* Add Lore Item Trade Error ([#3932](https://github.com/EQEmu/Server/pull/3932)) @fryguy503 2024-01-13
* Rule: UseLiveBlockedMessage Bard Spam ([#3933](https://github.com/EQEmu/Server/pull/3933)) @fryguy503 2024-01-09

### Fixes

* Attack Corpse Skill Up Fix ([#3924](https://github.com/EQEmu/Server/pull/3924)) @fryguy503 2024-01-09
* Fix Issue with SetFlyMode() ([#3961](https://github.com/EQEmu/Server/pull/3961)) @Kinglykrab 2024-01-12
* Harm Touch Critical Ratio ([#3915](https://github.com/EQEmu/Server/pull/3915)) @fryguy503 2024-01-09
* Increase Precision in CheckDoubleAttack ([#3928](https://github.com/EQEmu/Server/pull/3928)) @fryguy503 2024-01-09
* IsOfClientBotMerc() for Discipline Messages ([#3940](https://github.com/EQEmu/Server/pull/3940)) @fryguy503 2024-01-09
* Limit MeleeMitigationEffect to defender if only client. ([#3918](https://github.com/EQEmu/Server/pull/3918)) @fryguy503 2024-01-09
* Rampage Number of Hits Limit ([#3929](https://github.com/EQEmu/Server/pull/3929)) @fryguy503 2024-01-09
* Remove duplicate character_data repository in zonedb.cpp ([#3935](https://github.com/EQEmu/Server/pull/3935)) @Kinglykrab 2024-01-09
* Undead Should Never Flee ([#3926](https://github.com/EQEmu/Server/pull/3926)) @fryguy503 2024-01-09

### Global Loot

* Convert Global Loot to Repositories ([#3962](https://github.com/EQEmu/Server/pull/3962)) @Kinglykrab 2024-01-13

### Ground Spawns

* Convert Ground Spawns to Repositories ([#3967](https://github.com/EQEmu/Server/pull/3967)) @Kinglykrab 2024-01-13

### Horses

* Convert Horses to Repositories ([#3965](https://github.com/EQEmu/Server/pull/3965)) @Kinglykrab 2024-01-13

### Item Ticks

* Remove Item Ticks Code ([#3955](https://github.com/EQEmu/Server/pull/3955)) @Kinglykrab 2024-01-13

### Mercenaries

* Convert Mercenaries to Repositories ([#3947](https://github.com/EQEmu/Server/pull/3947)) @Kinglykrab 2024-01-13

### Merchants

* Convert Clear/Delete/Save of Temporary Merchant Lists to Repositories ([#3945](https://github.com/EQEmu/Server/pull/3945)) @Kinglykrab 2024-01-13

### NPCs

* Convert Load of NPC Emotes to Repositories ([#3954](https://github.com/EQEmu/Server/pull/3954)) @Kinglykrab 2024-01-13

### Objects

* Convert Add/Delete/Update of Objects to Repositories ([#3966](https://github.com/EQEmu/Server/pull/3966)) @Kinglykrab 2024-01-13
* Convert World Containers to Repositories ([#3951](https://github.com/EQEmu/Server/pull/3951)) @Kinglykrab 2024-01-13

### Pets

* Convert Pets to Repositories ([#3968](https://github.com/EQEmu/Server/pull/3968)) @Kinglykrab 2024-01-13

### Repositories

* Add null integer column support, instance_list notes migration, regenerate repositories ([#3969](https://github.com/EQEmu/Server/pull/3969)) @Akkadius 2024-01-13

### Respawns

* Convert Respawn Times to Repositories ([#3949](https://github.com/EQEmu/Server/pull/3949)) @Kinglykrab 2024-01-13

### Rules

* Add rule for bard aggro cap ([#3909](https://github.com/EQEmu/Server/pull/3909)) @fryguy503 2024-01-09
* Allow GMs to silently summon ([#3910](https://github.com/EQEmu/Server/pull/3910)) @fryguy503 2024-01-09
* Bash Two Hander use Shoulders ([#3925](https://github.com/EQEmu/Server/pull/3925)) @fryguy503 2024-01-09
* Classic Spell Data SPA Calc variability ([#3931](https://github.com/EQEmu/Server/pull/3931)) @fryguy503 2024-01-09
* Classic Tracking Skillups ([#3923](https://github.com/EQEmu/Server/pull/3923)) @fryguy503 2024-01-09
* Separate Tradeskill Max Train from Research. ([#3916](https://github.com/EQEmu/Server/pull/3916)) @fryguy503 2024-01-09

### Tasks

* Add Support for Task Window Element Groups ([#3902](https://github.com/EQEmu/Server/pull/3902)) @hgtw 2024-01-09

### Traps

* Convert Load of LDoN Traps/Trap Entries to Repositories ([#3953](https://github.com/EQEmu/Server/pull/3953)) @Kinglykrab 2024-01-13

### Zones

* Convert Get/Set of Zone Timezone to Repositories ([#3946](https://github.com/EQEmu/Server/pull/3946)) @Kinglykrab 2024-01-13
* Convert IDLE_WHEN_EMPTY to a Zone Column ([#3891](https://github.com/EQEmu/Server/pull/3891)) @Kinglykrab 2024-01-13
* Convert SaveZoneCFG to Repositories ([#3950](https://github.com/EQEmu/Server/pull/3950)) @Kinglykrab 2024-01-13

* [Bug Fix] quest::processmobswhilezoneempty() fix. (#3971)

* [Bug Fix] Fix zone database update manifest (#3972)

* [Bug Fix] Fix zone database update manifest

# Notes
- Missing comma.

* Update database_update_manifest.cpp

* [Release] 22.42.1 (#3973)

### Fixes

* Fix zone database update manifest ([#3972](https://github.com/EQEmu/Server/pull/3972)) @Kinglykrab 2024-01-13
* quest::processmobswhilezoneempty() fix. ([#3971](https://github.com/EQEmu/Server/pull/3971)) @noudess 2024-01-13

* [Merchants] Change database structure for merchant slots (#3974)

* [Merchants] Change database structure for merchant slots
The `slot` field should be unsigned int. The temp slot is currently limited to 127. The client will limit the visible slots.

* Update version.h

* [Repositories] Fix datetime zero-value save behavior (#3976)

* [Database] Drop deprecated item_tick table (#3977)

* [Release] 22.43.0 (#3978)

* [Repositories] Revert #3976 - fix character corpses

* [Bug Fix] Reversed logic on InLiquid (#3979)

Thank you @noudness for catching this. Reversed logic on InLiquid check for falling damage.

* [Spawn2] Spawn condition value should default spawn_conditions value (#3980)

* [Spawn2] Spawn condition value should default to value in spawn_conditions table

* Formatting changes and {}

* [Repositories] Add `rank` to reserved words (#3982)

* [Repositories] Add `rank` to reserved words

* Update zonedb.cpp

* Guild Ranks

---------

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>

* [Database] Drop item_tick if exists tweak in manifest (#3985)

* [Messages] Fix disciple message added by previous patch. (#3986)

* [Crash Fix] Reverting PR #3877 (#3997)

Reports of #3877 causing crashes on windows. No reports on Linux, but reverting for safety.

* Push discpline messages under melee->disciplines (#3987)

* Push discpline messages under melee->disciplines

* Added safe_delete()

* Remove fryguy's new message code and fix existing instead

* [Bot] ^mez command spell list fix (#3998)

This change will allow necros to cast mez spells when ^mez command is used.

* [Bug Fix] Fix Mercenaries Buffs/Zoning Issues (#4000)

# Notes
- Mercenaries were disappearing on zoning because they were saving to slot `1` and being loaded from slot `0`.
- Mercenaries were not displaying properly in group window because of this as well.
- Mercenary buffs were saving even when they did not have any buffs.

* [Zoning] Additional logs for zoning under instance checks (#3989)

* [Logging] Force Info category to be always on in file/console logs (#3990)

* [Database] Increase max spawngroup name from 50 to 200 (#3991)

* [Quest] QuestReward should now summon item to the inventory instead of the cursor. (#3996)

* [forage rule feature] add a rule to disabled using common_food_ids from the list in forage.cpp.  currently set to enabled.

* [Quest] change QuestReward summonitem to SummonItemToInventory.

* add closing brackets in QuestReward functions.

* [Commands] Add `#npcedit set_grid [Grid ID]` to `#npcedit` (#4004)

* [Commands] Add #npcedit grid_id to #npcedit

# Notes
- Adds `#npcedit grid_id [Grid ID]` to `#npcedit`.

* set_grid

* [Bug Fix] Fixes to zone idle while empty changes. (#4006)

* [Cleanup] Cleanup position methods (#4015)

# Notes
- Cleanup logic.

* [Instances] Convert Instance Quest Methods to Repositories (#4012)

* [Instances] Convert Instance Quest Methods to Repositories

# Notes
- Convert `UpdateInstanceTimer()` and `GetInstanceTimerByID()` to repositories.
- Cleanup other instance methods.

* Update questmgr.cpp

* [Crash Fix] Fix crash when creating Frogloks/Drakkin (#4016)

* [Crash Fix] Fix crash when creating Frogloks/Drakkin

# Notes
- https://github.com/EQEmu/Server/pull/3920 introduced an issue where we were using `uchar` for `race_selection` and `class_selection` which was not functioning properly within `IsPlayerRace()`.

* Update client.cpp

* [Release] 22.43.2 (#4017)

### Bots

* ^mez command spell list fix ([#3998](https://github.com/EQEmu/Server/pull/3998)) @dariusuknuis 2024-01-19

### Code

* Cleanup position methods ([#4015](https://github.com/EQEmu/Server/pull/4015)) @Kinglykrab 2024-01-25

### Commands

* Add `#npcedit set_grid [Grid ID]` to `#npcedit` ([#4004](https://github.com/EQEmu/Server/pull/4004)) @Kinglykrab 2024-01-22

### Crash Fix

* Fix crash when creating Frogloks/Drakkin ([#4016](https://github.com/EQEmu/Server/pull/4016)) @Kinglykrab 2024-01-25
* Reverting PR #3877 ([#3997](https://github.com/EQEmu/Server/pull/3997)) @fryguy503 2024-01-17

### Database

* Drop deprecated item_tick table ([#3977](https://github.com/EQEmu/Server/pull/3977)) @Akkadius 2024-01-14
* Drop item_tick if exists tweak in manifest ([#3985](https://github.com/EQEmu/Server/pull/3985)) @Akkadius 2024-01-15
* Increase max spawngroup name from 50 to 200 ([#3991](https://github.com/EQEmu/Server/pull/3991)) @Akkadius 2024-01-22

### Fixes

* Fix Mercenaries Buffs/Zoning Issues ([#4000](https://github.com/EQEmu/Server/pull/4000)) @Kinglykrab 2024-01-22
* Fix zone database update manifest ([#3972](https://github.com/EQEmu/Server/pull/3972)) @Kinglykrab 2024-01-13
* Fixes to zone idle while empty changes. ([#4006](https://github.com/EQEmu/Server/pull/4006)) @noudess 2024-01-23
* Reversed logic on InLiquid ([#3979](https://github.com/EQEmu/Server/pull/3979)) @fryguy503 2024-01-14

### Instances

* Convert Instance Quest Methods to Repositories ([#4012](https://github.com/EQEmu/Server/pull/4012)) @Kinglykrab 2024-01-25

### Logging

* Force Info category to be always on in file/console logs ([#3990](https://github.com/EQEmu/Server/pull/3990)) @Akkadius 2024-01-22

### Merchants

* Change database structure for merchant slots ([#3974](https://github.com/EQEmu/Server/pull/3974)) @joligario 2024-01-14

### Messages

* Fix disciple message added by previous patch. ([#3986](https://github.com/EQEmu/Server/pull/3986)) @noudess 2024-01-15

### Quest API

* QuestReward should now summon item to the inventory instead of the cursor. ([#3996](https://github.com/EQEmu/Server/pull/3996)) @regneq 2024-01-22

### Repositories

* Add `rank` to reserved words ([#3982](https://github.com/EQEmu/Server/pull/3982)) @Akkadius 2024-01-15
* Fix datetime zero-value save behavior ([#3976](https://github.com/EQEmu/Server/pull/3976)) @Akkadius 2024-01-14

### Spawn2

* Spawn condition value should default spawn_conditions value ([#3980](https://github.com/EQEmu/Server/pull/3980)) @noudess 2024-01-14

### Zoning

* Additional logs for zoning under instance checks ([#3989](https://github.com/EQEmu/Server/pull/3989)) @Akkadius 2024-01-22

* [Bug Fix] Limit Pet Taunt Distance (#4018)

* [Bug Fix] Limit pet taunt distance

Previously this was not regulated and allowed players to exploit unlimited taunt distance.

Rule Name: PetTauntRange
Rule Default: 150

Calculation is Rule Squared.

* Remove `this`

* [Bug Fix] Limit Player Taunt Distance (#4019)

* [Bug Fix] Player Taunt Distance

Previously this was not regulated on the server side and allowed players to exploit situations where the client did not enforce Z distance checks.

Rule Name: MaximumTauntDistance
Rule Default: 150

Calculation is Rule Squared

* remove `this`

* [Quests] Use separate variable for quest idle override. (#4026)

* [Quests] Use separate variable for quest idle override.

* Fix missing zone->

* [Crash Fix] Fix Possible Crash in HateList::Find (#4027)

# Notes
- We were not doing any pointer validation, so we were causing crashes in some cases.
- Example: http://spire.akkadius.com/dev/release/22.43.2?id=19163

* [Bug Fix] Fix issue in character_corpses Repository Query (#4029)

* [Bug Fix] Fix issue in character_corpses Repository Query

# Notes
- Query had an extra ` inside of it, causing it to fail.

* Update character_corpses_repository.h

* [API] Add lock_status method to world API (#4028)

* [Beacon] Cleanup Beacons Code (#4024)

# Notes
- Use constants where possible.
- Change `resist_adjust` parameter in `Beacon::AELocationSpell` from `resist_adjust` to `in_resist_adjust` so we're not possibly causing parameter shadowing.

* [Bots] Convert Bot Database Methods to Repositories (#4023)

* [Bots] Convert Bot Database Methods to Repositories

* Final push.

* Cleanup.

* Cleanup.

* Update bot_database.cpp

* Update bot_database.cpp

* Update bot_database.cpp

* Update bot_database.cpp

* Update bot_database.cpp

* [Spawn2] Convert Spawn2 Methods to Repositories (#4014)

* [Spawn2] Convert Spawn2 Methods to Repositories

# Notes
- Convert `CreateSpawn2()`, `GetCondition()`, `LoadSpawnConditions()`, `LoadSpawnEvent()`, `UpdateSpawnCondition()`, and `UpdateSpawnEvent()` to repositories.

# Images

* Update spawn2.cpp

* [Cleanup] Add Raid Loot Type Constants (#4022)

* [Cleanup] Add Raid Loot Type Constants

# Notes
- Add constants for Raid loot types.

* [Cleanup] Add Raid Loot Type Constants

# Notes
- Add constants for Raid loot types.

* [Commands] Cleanup #petitems Command (#4005)

- Adds support to `#petitems` to allow you to target bot's pets to view their items, defaults to your pet if you have one.
- If you have no pet or no bot pet targeted it won't function.

* [Merchants] Convert Merchant Load to Repositories (#4007)

* [Merchants] Convert Merchant Load to Repositories

# Notes
- Convert `GetMerchantDataForZoneLoad()` to repositories.

# Images
## Load

* Change to LoadMerchants()

* [Mercenaries] Add expansion settings update to Mercs:Enable (#4001)

# Notes
- Adds an expansion settings update to the `Mercs:Enable` command, only updates if the expansion setting isn't already `-1` or doesn't already contain the bitmask for Seeds of Destruction (16384).
- This will enable Mercenary Liaisons spawning properly in Plane of Knowledge for the hiring of mercenaries.

* [Alternate Currency] Convert Load of Alternate Currencies to Repositories (#3993)

# Notes
- Convert `LoadAlternateCurrencies()` to repositories.

* [Traps] Convert Load/Set of Traps to Repositories (#3994)

# Notes
- Convert `LoadTraps()` and `SetTrapData()` to repositories.

* [Bug Fix] Fix NPC After Death Emotes (#4021)

* [Bug Fix] Fix NPC After Death Emotes

- `DoNPCEmote` was being called on the corpse, not the NPC, so it wasn't working for some reason despite it working for years.
- Cleaned up some other logic and variable names in `NPC::Death` while I was in there.

* Update attack.cpp

* Update npc.cpp

* Update attack.cpp

* Update attack.cpp

* [Pets] Convert Load of Pets Beastlord Data to Repositories (#3995)

* [Pets] Convert Load of Pets Beastlord Data to Repositories

# Notes
- Convert `GetBeastlordPetData()` to repositories.
- Add support for `unsigned` versions of `float`, `double`, and `decimal`, without this we defaulted to `std::string`, such as with `pets_beastlord_data`.

* Update repository-generator.pl

---------

Co-authored-by: Chris Miles <akkadius1@gmail.com>

* [Rules] Add rules for cross-zone/world-wide casts to affect Bots/Mercenaries/Pets (#4002)

* [Rules] Add rules for cross-zone/world-wide casts to affect bots/mercenaries/pets

# Notes
- These rules allow operators to have cross-zone/world-wide casts/removals of spells affect bots, mercenaries, and/or pets.
- Adds `World:AllowWorldWideSpellsOnBots`.
- Adds `World:AllowWorldWideSpellsOnMercs`.
- Adds `World:AllowWorldWideSpellsOnPets`.
- Adds `Zone:AllowCrossZoneSpellsOnBots`.
- Adds `Zone:AllowCrossZoneSpellsOnMercs`.
- Adds `Zone:AllowCrossZoneSpellsOnPets`.

* Consolidate to 3 rules

* [Cleanup] Cleanup cross-zone/world-wide OPCode handling (#4003)

* [Cleanup] Cleanup cross-zone/world-wide OPCode handling

# Notes
- Cleans up the logic greatly for cross-zone/world-wide methods since we were doing extraneous status checks and needlessly allocating memory for variables.

* Update worldserver.cpp

* [Grids] Convert Grid/Grid Entries to Repositories (#4011)

* [Grids] Convert Grid/Grid Entries to Repositories

- Convert `AddWaypoint()`, `AddWaypointForSpawn()`, `DeleteWaypoint()`, `GetHighestWaypoint()`, `GetRandomWaypointFromGrid()`, `GridExistsInZone()`, and `ModifyGrid()` to repositories.

* Update grid.cpp

* Update questmgr.cpp

* Update waypoints.cpp

* Update waypoints.cpp

* [Hotfix] Fix database loading routines (#4030)

* [Zone] Convert Fishing/Foraging to Repositories (#4008)

* [Zone] Convert Fishing/Foraging to Repositories

# Notes
- Convert `LoadFishing()` and `LoadForage()` to repositories.

* Update forage.cpp

* Cleanup

* [Bots] Missing boolean returns on DeletePetStats and SaveInspectMessage (#4031)

* [Bug Fix] Patch for recent change to DEATH (#4032)

* [Bug Fix] spawn_conditions map was being emptied by mistake (#4033)

* [Release] 22.43.3 (#4034)

### API

* Add lock_status method to world API ([#4028](https://github.com/EQEmu/Server/pull/4028)) @Akkadius 2024-01-29

### Alternate Currency

* Convert Load of Alternate Currencies to Repositories ([#3993](https://github.com/EQEmu/Server/pull/3993)) @Kinglykrab 2024-01-29

### Beacon

* Cleanup Beacons Code ([#4024](https://github.com/EQEmu/Server/pull/4024)) @Kinglykrab 2024-01-29

### Bots

* Convert Bot Database Methods to Repositories ([#4023](https://github.com/EQEmu/Server/pull/4023)) @Kinglykrab 2024-01-29
* Missing boolean returns on DeletePetStats and SaveInspectMessage ([#4031](https://github.com/EQEmu/Server/pull/4031)) @joligario 2024-01-30

### Code

* Add Raid Loot Type Constants ([#4022](https://github.com/EQEmu/Server/pull/4022)) @Kinglykrab 2024-01-29
* Cleanup cross-zone/world-wide OPCode handling ([#4003](https://github.com/EQEmu/Server/pull/4003)) @Kinglykrab 2024-01-29

### Commands

* Cleanup #petitems Command ([#4005](https://github.com/EQEmu/Server/pull/4005)) @Kinglykrab 2024-01-29

### Crash Fix

* Fix Possible Crash in HateList::Find ([#4027](https://github.com/EQEmu/Server/pull/4027)) @Kinglykrab 2024-01-28

### Fixes

* Fix NPC After Death Emotes ([#4021](https://github.com/EQEmu/Server/pull/4021)) @Kinglykrab 2024-01-29
* Fix database loading routines ([#4030](https://github.com/EQEmu/Server/pull/4030)) @Akkadius 2024-01-29
* Fix issue in character_corpses Repository Query ([#4029](https://github.com/EQEmu/Server/pull/4029)) @Kinglykrab 2024-01-29
* Limit Pet Taunt Distance ([#4018](https://github.com/EQEmu/Server/pull/4018)) @fryguy503 2024-01-26
* Limit Player Taunt Distance ([#4019](https://github.com/EQEmu/Server/pull/4019)) @fryguy503 2024-01-26
* Patch for recent change to DEATH ([#4032](https://github.com/EQEmu/Server/pull/4032)) @noudess 2024-01-30
* spawn_conditions map was being emptied by mistake ([#4033](https://github.com/EQEmu/Server/pull/4033)) @noudess 2024-01-30

### Grids

* Convert Grid/Grid Entries to Repositories ([#4011](https://github.com/EQEmu/Server/pull/4011)) @Kinglykrab 2024-01-29

### Mercenaries

* Add expansion settings update to Mercs:Enable ([#4001](https://github.com/EQEmu/Server/pull/4001)) @Kinglykrab 2024-01-29

### Merchants

* Convert Merchant Load to Repositories ([#4007](https://github.com/EQEmu/Server/pull/4007)) @Kinglykrab 2024-01-29

### Pets

* Convert Load of Pets Beastlord Data to Repositories ([#3995](https://github.com/EQEmu/Server/pull/3995)) @Kinglykrab 2024-01-29

### Quests

* Use separate variable for quest idle override. ([#4026](https://github.com/EQEmu/Server/pull/4026)) @noudess 2024-01-27

### Rules

* Add rules for cross-zone/world-wide casts to affect Bots/Mercenaries/Pets ([#4002](https://github.com/EQEmu/Server/pull/4002)) @Kinglykrab 2024-01-29

### Spawn2

* Convert Spawn2 Methods to Repositories ([#4014](https://github.com/EQEmu/Server/pull/4014)) @Kinglykrab 2024-01-29

### Traps

* Convert Load/Set of Traps to Repositories ([#3994](https://github.com/EQEmu/Server/pull/3994)) @Kinglykrab 2024-01-29

### Zone

* Convert Fishing/Foraging to Repositories ([#4008](https://github.com/EQEmu/Server/pull/4008)) @Kinglykrab 2024-01-30

* [Bug Fix] Fix Issue with Bot Dual wield (#4037)

# Notes
- Bots were using primary weapons even for dual wield attacks so they were never attacking with their secondary even when they should be.

* [Bug Fix] Fix Bot Non-Melee Damage Messages (#4038)

# Notes
- These were not displaying because bots pass the `attacker && attacker->GetOwner()` check which assumes they're a pet because we weren't confirming it wasn't a bot.

# Image

* [Feature] Add support to crosszone/worldwide spells to affect bot pets  (#4036)

* [Bug Fix] Move break in ServerOP_WWSpell handler

# Notes
- This break was cancelling loop early, m

* [Feature] Add support to crosszone/worldwide spells to affect bot pets

* [Bot Commands] Separate Bot Commands into Individual Files (#4035)

# Notes
- Separate all bot commands into individual files like regular commands.

# Images

* [Objects] Add `fix_z` column to ground spawns (#3992)

* [Objects] Add is_floating column to objects/ground spawns

# Notes
- Allows ground spawns/objects to float without having `FixZ()` called.

* Remove from object.

* Database version

* Fix

* Change to fix_z

* [Bug Fix] Fix for potential crash of DS damage on death (#4040)

On the unfortunate timing of a bot or owner dying when the bot deals damage due to a DS and the owner pointer is no longer valid.

* [Cleanup] Remove redundant check in Object::HandleCombine (#4041)

Some minor formatting updates.

* [Factions] Remove from shared memory and simplify (#3999)

* [Factions] Remove from shared memory and simplify

- Removes factions from shared memory and moves to zone based storage of repositories and changes the NPC `faction_list` to also use repositories.
- This affects NPC Factions and Faction Associations.

* Bug fixes.

* Update client.cpp

* Update client.cpp

* Update client.cpp

* Cleanup

* Update client.cpp

* Update client.cpp

* Update client.cpp

* Final push

* Update CMakeLists.txt

* Consolidate reloading.

* [Cleanup] PR # 3999 (#4039)

* [Fixes for PR # 3999

* [Reload actual in game factions, not just the umbrella data.

* syntax

* Fix typo

* Foix bug where primary_faction not filled in when no hits

* Fix typos

* Fix splash factions for kills.

* Fix typo

* Fix more variable names to be accurate

* Fix Loads to load new ones as they come in.

* Load npc_factions without primary (tasks) and support old task faction

* Rename to make way for new LoadFactionAssocition (by faction_id)

* Fix some review comments

* Add code to load factions for splash tasks and quests.

* Fix issue with sign and RewardFaction, fix Log Message

---------

Co-authored-by: Paul Coene <noudess@gmail.com>

* [GM Commands] Fix typo in #rules help. (#4042)

* [Quest API] Add GetAAEXPPercentage() and GetEXPPercentage() to Perl/Lua (#4044)

* Initial Push

* Push

* Push.

* [Commands] Add #show special_abilities (#4043)

* [Commands] Add #show special_abilities

# Notes
- Allows operators to see what special abilities an NPC has.
- Move special ability values to `common/emu_constants.h`.
- Add `EQ::constants::GetSpecialAbilityMap()` and `EQ::constants::GetSpecialAbilityName()`.
- Add `NPC::DescribeSpecialAbilities(client)` to describe special abilities to a specified client.

# Images

* Update npc.cpp

* [Loot] Remove from shared memory, simplification (#3988)

* First pass of pulling loot out of shared memory, functional

* More code cleanup

* More cleanup

* More cleanup

* More cleanup

* Add loot reload type

* Reload, logging

* Update npc.h

* Cleanup

* Logging, don't load attempt to load loottable id 0

* Update worldserver.cpp

* Update client.cpp

* Update zone_loot.cpp

* PR feedback

* Update zone.cpp

* Memory leak suggestion

* Update CMakeLists.txt

* Post rebase issues

* [Feature] Add optional `is_forced` parameter to Zone::Repop (#4046)

* [Feature] Add optional `is_force` parameter to Zone::Repop

# Perl
- Add `quest::repopzone(is_force)`.

# Lua
- Add `eq.repop_zone(is_force)`.

# Commands
- Cleanup `#repop` to use new parameter in `Zone::Repop`.

# Notes
- Allows operators to forcefully repop a zone without using a second method to clear the respawn timers.

* is_forced

* Update repop.cpp

* Update repop.cpp

* [Base Data] Remove from shared memory and simplify (#4045)

* [Base Data] Remove from shared memory and simplify

- Removes Base Data loading from shared memory and puts it into zone.
- Changes type of `level` and `class` to `uint8_t` from `uint32_t` for consistency since we're renaming fields here anyway.
- Renames `unk1` to `hp_regen` in `base_data` table.
- Renames `unk2` to `end_regen` in `base_data` table.
- These changed fields were already mapped, we just hadn't renamed them for whatever reason.
- Regenerates Base Data repository.
- Adds `#reload base_data` to reload base data in real time.

* Cleanup

* Update shareddb.h

* Cleanup.

* Update shareddb.cpp

* Update main.cpp

* [Database] Correct manifest migration entries that should be content (#4047)

* [Quests] Cleanup Quest Parser Logic (#4025)

* [Quests] Cleanup Quest Parser Logic

# Notes
- Consolidate duplicated code into loops to make it easier to read and easier to add on to.

# Images

* Update quest_parser_collection.cpp

* Push

* Push

* Update embperl.cpp

* Push

* Additional cleanup, use File::Exists utility

* Range based loops

* Update embparser.cpp

* Cleanup

* Update embparser.cpp

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>

* [Feature] Corpse Overhaul (#3938)

# Corpse Overhaul

Changelog:

- Player corpses now have two timers, one specific to the rezability of the corpse and the other to cover the overall rot timer of the player corpse.
- The rezability timer is based on the online presence of the player/account and is not affected by being offline.
- The rot timer is not affected by offline/online status and will count to the rot status of the corpse.
- Corpses can be rezzed multiple times, however only the first rez that yeilds returned xp will be counted. Not other rez will return any xp. This allows for a "Poor mans COTH" as was used many times in the early eras.
- All Corpse class private/protected member variables are all now prefixed with m_
- Added Corpses logging category along with many debug logs
- Removed LoadCharacterCorpseData
- Removed LoadCharacterCorpseEntity
- Added LoadCharacterCorpse(const CharacterCorpsesRepository::CharacterCorpses, const glm::vec4 &position) which simplifies areas of consumption and reduces double queries from removing LoadCharacterCorpseData and replacing LoadCharacterCorpseEntity
- All parameters that were prefixed with in_ have been dropped
- Removed two queries from CheckIsOwnerOnline and have it query the world's CLE by account_id since that is how live works
- Regenerated repository character_corpses
- Cleaned up many list iterators to use range based for loops
- Rate limit Corpse::Process m_is_rezzable with a 1 second check timer
- General code cleanup
- Added a Server Up check to bury all corpses in instances to prevent lost corpses if an instance is released during server down. This facilitates player recovery via shadowrest or priests of luclin.


This PR also now fixes a long standing issue with HasItem performance in our script plugins. It is significantly faster, we will need to coordinate quest changes and comms with operators.

```lua
    if ($client->HasItemOnCorpse($item_id)) {
        return 1;
    }
```

```lua
    --corpse
    if self:HasItemOnCorpse(itemid) then
        return true
    end
```


Testing Completed:

- Create a Corpse
- Standard rezzing
- Ghetto Coth (No Extra XP)
- Rezzing after graveyard move
- Divine Rez works as intended
- No XP Rez (Corpse Call) does not give XP
- Corpse Burying
- Cross Instance Graveyard Corpse movement/Rezzing
- DZ End/Quit Corpse Movement/Rezzing
- Server Shutdown/Reinit DZ Corpse Movement/Rezzing


---------

Co-authored-by: Akkadius <akkadius1@gmail.com>

* [Bug Fix] Fix Froglok Starting Languages (#4050)

# Notes
- Switch was using the wrong race ID.

* [Feature] Classic Taunt (Pre 2006) style of taunt (#3942)

* DRAFT - Classic Taunt (Pre 2006) style of taunt

RULE: ClassicTauntSystem

Completely seperate logic for each system. Could potentially be re-writte to be more inline but there are a good bit of minor differences.

* Consolidate Logic

Still needs in-game testing

* Feedback Request

* Updates per feedback

* [Deprecation] Remove eqemu_server.pl script and ties to server (#4049)

* [Tasks] Send active elements in task select packet (#4051)

Only the first element was being serialized to show the start zone of
tasks. This was resulting in a blank description for tasks that only
have element descriptions.

Live sends all initial active elements for the task when sending this
packet. Any bracket text with these elements as a requirement will be
appended to the description.

* [Tasks] Avoid removing client tasks from memory on load (#4052)

If a task was deleted or had new elements added to it without updating
character states to match changes, client state for the task was not
loaded into memory and a "contact a GM" warning was sent to the client.

This caused an issue if a client later accepted a new task because it
could be placed in the same client state slot as a non-loaded task. The
table does not have constraints so this was also inserted into the db.

The next time client task state was reloaded after zoning, the new task
would not be loaded since it occupied a used slot, even though that used
slot was also not being loaded. The client could not remove or reacquire
the original task without GM intervention and an entry was left in the
db for the new task.

This makes the following changes to client task state loading:

 - If a task id no longer exists it is deleted from client state tables
   instead of only being removed from memory.

 - If a task occupies the same client state slot as another task, it is
   deleted from client state tables instead of being ignored.

 - If new elements have been added to a task, client state will keep the
   task in memory. The new activity states will be inserted into the db
   when necessary for updates (may not be immediate).

These changes also fix two smaller bugs as a consequence:

 - If a character was at the 20 quest limit the last quest wasn't being
   processed for activity count changes. The task would continue to show
   to clients but any added new elements couldn't be completed.

 - Deleted tasks that occupied slot 0 in client state would fallback to
   loading it as a solo task of type 0. This prevented a client's real
   solo task from being loaded if the deleted task was processed first.

Note clients may receive or lose credit for completed elements if new
ones are added in the middle of tasks. Server ops will still need to
update character state tables manually on task changes to prevent this.

* [Cleanup] Convert Quest Ornament Methods to Repositories (#4048)

# Notes
- Convert `Client::SetPrimaryWeaponOrnamentation` and `Client::SetSecondaryWeaponOrnamentation` to repositories.

* [Feature] Add RoF2 Guild features (#3699)

* [Feature] Add additional Guild Features

This adds the following guild features and design pattern
- the existing guild system was used
- guild features are based on RoF2 within source with translaters used to converted between client differences
- backward compatible with Ti and UF, and allows for mixed client servers
- Guild Back for Ti and UF is based on RoF2 Permissions for banking if Guild Leader does not use Ti/UF
- Guild Ranks and Permissions are enabled.
- Guild Tributes are enabled.
- Event logging via rules for donating tribute items and plat
- Rules to limit Guild Tributes based on max level of server
- Rewrote guild communications to client using specific opcodes
-- Server no longer sends a guild member list on each zone
-- Guild window is updated when a member levels, rank changes, zone changes, banker/alt status using individual opcodes
-- When a member is removed or added to a guild, a single opcode is sent to each guild member
-- This reduces network traffic considerably

Known issues:
- Visual bug only. Guild Tributes window will display a 0 for level if tribute is above max level rule setting.
- Visual bug only. Guild Mgmt Window will not display an online member if the player has 'show offline' unchecked and a guild member zones within the Notes/Tribute tab.  This is resolved by selecting and de-selecting the 'Show Offline' checkbox.

* Updated RoF2 Guild Comms

Updated RoF2 Guild Comms
Update RoF2 Opcodes
Rewrote RoF2 Guild Communications using specific opcodes.
Added database changes - they are irreversible

* Formatting

* Update base_guild_members_repository.h

* Format GuildInfo

* Format GuildAction enum

* Formatting in clientlist

* quantity vs quantity

* desc vs description

* Format structs

* Inline struct values

* Formatting

* Formatting

* Formatting fixes

* Formatting items

* Formatting

* Formatting

* struct formatting updates

* Updated formatting

* Updated
- std:string items
- naming conventions
- magic numbers

* Repo refactors
Other formatting updates

* Remove test guild commands

* Updated #guild info command

* Add new repo methods for Neckolla ReplaceOne and ReplaceMany

* Fix guild_tributes repo

* Update database_update_manifest.cpp

* Phase 1 of final testing with RoF2 -> RoF2.
Next phase will be inter compatibility review

* Remove #guild testing commands

* Fix uf translator error
Rewrite LoadGuilds

* Use extended repository

* FIx guild window on member add

* LoadGuild Changes

* Update guild_base.cpp

* Few small fixes for display issue with UF

* Update guild_base.cpp

* Update guild_members_repository.h

* Update zoneserver.cpp

* Update guild.cpp

* Update entity.h

* Switch formatting

* Formatting

* Update worldserver.cpp

* Switch formatting

* Formatting switch statement

* Update guild.cpp

* Formatting in guild_base

* We don't need to validate m_db everywhere

* More formatting / spacing issues

* Switch format

* Update guild_base.cpp

* Fix an UF issue displaying incorrect guildtag as <>

* Updated several constants, fixed a few issues with Ti/UF and guild tributes not being removed or sent when a member is removed/disbands from a guild.

* Formatting and logging updates

* Fix for Loadguilds and permissions after repo updates.

* Cleanup unnecessary m_db checks

* Updated logging to use player_event_logs

* Updated to use the single opcodes for guild traffic for Ti/UF/RoF2.  Several enhancements for guild functionality for more reusable code and readability.

* Update to fix Demote Self and guild invites declining when option set to not accept guild invites

* Potential fix for guild notes/tribute display issues when client has 'Show Offline' unchecked.

* Updates to fox recent master changes

Updates to fix recent master changes

* Updates in response to comments

* Further Updates in response to comments

* Comment updates and refactor for SendAppearance functions

* Comment updates

* Update client spawn process for show guild name

Add show guild tag to default spawn process

* Update to use zone spawn packets for RoF2
Removed several unused functions as a result
Updated MemberRankUpdate to properly update guild_show on rank change.
Updated OP_GuildURLAndChannel opcode for UF/RoF2

* Cleanup of world changes
Created function for repetitive zonelist sendpackets to only booted zones
Re-Inserted accidental delete of scanclosemobs

* Fixes

* Further world cleanup

* Fix a few test guild bank cases for backward compat
Removed a duplicate db call
Fixed a fallthrough issue

* Update guild_mgr.cpp

* Cleanup

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>

* [Hotfix] fs::exists(fs::path{name}) does not work for Chinese characters in windows

* Revert "[Hotfix] fs::exists(fs::path{name}) does not work for Chinese characters in windows"

This reverts commit 801025c1663c6a077557f2c4cc446b9501f9ba18.

* [Crash Reporting] Update Spire to use SSL (#4055)

* [Release] 22.44.0 (#4056)

* [Release] 22.44.0

* Update CHANGELOG.md

* [File] Fix File::Exists(file_name) to be resilient to Chinese characters (#4058)

* Update file.cpp

* Update file.cpp

* Update file.cpp

* Update file.cpp

* Update file.cpp

* Update file.cpp

* Update file.cpp

* Update file.cpp

* Final fix

* [Release] 22.44.1

* [Guilds] Clean up `GUILD_RANK_NONE` references (#4059)

Should be exhaustive for guild rank values
Cleans up redefinition of `GUILD_RANK_NONE` by including `GUILD_RANK_NONE_TI`
Fixes #4057

* [Database] Fix default value for `time_of_death` in `character_corpses` (#4060)

* [Database] Fix default value for `time_of_death` in `character_corpses`

* Extra `NULL`

* Update repository

* Repositories with updated structure this time

* [Database] Proper default for `droptime` from `object_contents` (#4061)

* [Database] Fix table name in manifest (#4063)

* [Fix] Guard against crash condition (#4062)

* [Cleanup] Use explicit conversions for enum formatting (#4064)

This is prep for updating to fmt 10 which removed implicit conversions
for enums.

* [Bots] Remove Alt Combat Functionality (#4067)

* [Bots] Remove Alt Combat Functionality

# Notes
- This functionality needlessly complicates bot targeting logic and causes crashes and unintended behavior for players when accidentally enabled or enabled by default.

* Cleanup

* [Release] 22.44.2 (#4068)

* [Bug Fix] Fix Issue with ClearSpawnTimers() (#4070)

# Notes
- We were using the improper ID for this and not checking if the vector was empty before using.

* [Release] 22.44.3 (#4072)

### Fixes

* Fix Issue with ClearSpawnTimers() ([#4070](https://github.com/EQEmu/Server/pull/4070)) @Kinglykrab 2024-02-13

* [Hotfix] Fix ClearSpawnTimers() (#4073)

# Notes
- This wasn't a part of my other pull request.
- We were clearing `spawn2_list` before using it in `ClearSpawnTimers()`.

* [Release] 22.44.4 (#4074)

### Fixes

* Fix ClearSpawnTimers() ([#4073](https://github.com/EQEmu/Server/pull/4073)) @Kinglykrab 2024-02-13

* [Hotfix] Fix issues where we're using the wrong database pointers

* [Quest API] Add IsInAGuild() to Perl/Lua (#4066)

# Perl
- Add `$client->IsInAGuild()`.

# Lua
- Add `client:IsInAGuild()`.

# Notes
- Allows operators to more accurately tell if a player is in a group.
- `GuildID()` returns `uint32` max value if the player isn't in a guild so conditions using it must check for a value over a certain point, this is just a bool that simplifies that logic.

* [Opcodes] Fix opcode reloading (#4075)

* [Bug Fix] Fix #wpadd Query (#4078)

# Notes
- `GetNextWaypoint()` was getting a null value and crashing in `Strings::ToInt()`.

* [Bug Fix] Fix ObjectContentsRepository using content_db (#4076)

# Notes
- `*this` was using content database, causing this not to work on servers using sharded databases.

* [Bug Fix] Fix fix_z Query (#4080)

# Notes
- This query was not working properly due to using backticks instead of single quotes.

* [Bug Fix] Fix manifest check on `base_data` change (#4082)

* [Database] Remove "item_tick" from database schema per https://github.com/EQEmu/Server/pull/3985 (#4083)

* [Repositories] Convert Zone Flags to Repositories (#4077)

# Notes
- Converts `ClearZoneFlag()`, `LoadZoneFlags()`, and `SetZoneFlag()` to repositories.

* [Quest API] Add tracebacks to Lua error messages (#4079)

This adds an error msg handler for lua calls to add a stack trace to
error messages. Lua 5.1 does not have luaL_traceback like luajit and lua
5.2+ so debug.traceback() is used directly as the msg handler.

The traceback will add more detail to errors than just logging package
and event names. Exceptions in C++ binds and luabind errors will now
show script context instead of just the error message.

e.g., for a luabind overload error:

  No matching overload found, candidates:
  void signal(int,int,int)
  void signal(int,int)
  stack traceback:
    [C]: in function 'signal'
    quests/arena/player.lua:10: in function 'somefn'
    quests/arena/player.lua:27: in function <quests/arena/player.lua:17>

* [Code] Update fmt to 10.2.1 (#4071)

This fixes MSVC compile warnings for stdext::checked_array_iterator
which were deprecated in STL for VS 2022 17.8:

https://github.com/microsoft/STL/wiki/Changelog#vs-2022-178

* [Bug Fix] Update database_schema to add guild_permissions (#4085)

* Update database_schema to add guild_permissions

* Reordered

* [Feature] Hot Zone Bonus XP Notice (#4091)

When in Hotzones, a bonus XP notice will let players know the hotzone is enabled.

* [Bug Fix] Aura effect spell id from #3964 (#4094)

Auras were trying to cast another aura spell vice the spell effect

* [Bug Fix] Fix issue with IsEntOnHateList (#4097)

# Notes
- We were not validating pointer in `IsEntOnHateList()`.

* [Bots] Cleanup empty `bot_commands` files (#4095)

* [Bots] Cleanup empty `bot_commands` files

# Notes
- These files were part of the conversion of bot commands to individual files, these commands are part of overarching commands and therefore do not have their own files.
- These were not removed when initially committed.

* Update bot_command.cpp

* Update bot_command.cpp

* [Bug Fix] Fix Sympathetic Procs for Bots/Mercenariess (#4086)

# Notes
- Bots and Mercenaries were being rejected at the top of this method despite us allowing them to use this method where it's called.

* [Quest API] Add spell cast methods to Lua (#4096)

# Notes
- Add `eq.cast_spell(spell_id)` and `eq.self_cast(spell_id)` to Lua.
- Lua did not have a `quest::castspell(spell_id)` or `quest::selfcast(spell_id)` equivalent, so this adds them.

* [Quest API] Add Timer Events to Perl/Lua (#4099)

* [Quest API] Add Timer Events to Perl/Lua

# DRAFT

* Cleanup

* [Quest API] Add Entity Variable Events to Perl/Lua (#4092)

* [Quest API] Add Entity Variable Events to Perl/Lua

- Add `EVENT_ENTITY_VARIABLE_DELETE`.
- Add `EVENT_ENTITY_VARIABLE_SET`.
- Add `EVENT_ENTITY_VARIABLE_UPDATE`.
- All export `$variable_name` and `$variable_value`.

- Add `event_entity_variable_delete`.
- Add `event_entity_variable_set`.
- Add `event_entity_variable_update`.
- All export `e.variable_name` and `e.variable_value`.

- Allows operators to perform operations when entity variables are cleared, deleted, set, or updated.

* Update mob.cpp

* Cleanup.

* Cleanup

* Update mob.cpp

* Update lua_general.cpp

* Update embparser_api.cpp

* [Expansions] Zone Expansion Version Routing (#4084)

* Expansion version routing

* CheckForImproperContentFiles rule

* Update world_content_service.cpp

* Update client.cpp

* Update client.cpp

* Update CheckForImproperContentFiles

* Remove nek pok check

* Remove file checking

* Remove

* Command and dev tools menu tweaks

* Update world_content_service.cpp

* Update world_content_service.cpp

* Update version path

* Update content_filter_criteria.h

* Update content_filter_criteria.h

* Update quest_parser_collection.cpp

* Update comments

* PR feedback

* Update client_packet.cpp

* Remove notes column for display cleanliness

* [Repositories] Cleanup and Convert Character Creation to Repositories (#4053)

* [Repositories] Cleanup and Convert Character Creation to Repositories

# Notes
- Converts `Database::GetCharacterID()`, `Database::SaveCharacterCreate()`, and `Client::OPCharCreate` to repositories.
- Cleanup a spot we were doing a queries in a loop.

* Cleanup

* Update database.cpp

* Update database.cpp

* [Logs] Fix log in BaseGuildManager::IsGuildLeader() (#4102)

Looks like typos created invalid escapes

* [Bug Fix] Revert 2df7d19 (#4101)

* [Bug Fix] Revert https://github.com/EQEmu/Server/commit/2df7d19f975cb21dd4eb7d6c7d40656cf58ed138
This change breaks lich-type spells as seen in #4098. Per comment on original change, also don't see where Runes come into play.

* Revert invis change

* [Bug Fix] Correct Rune damage check location for invis break.

Correct the location of the CommonBreakInvis for runes. Appologize for the incorrect location. Thank you JJ for pointing me to the PR that caused the issue.

---------

Co-authored-by: Trust <fryguy503@gmail.com>

* [Factions] Fix issue with npcedit and cached factions (#4103)

* [Factions] Fix issue with npcedit and cached factions

* Load no matter what

* [Database] Add content_database flag for zone changes (#4104)

* [Bug Fix] Add safety check to SummonAllCharacterCorpses. (#4107)

Should prevent an empty vector from being passed to the repository.

* [Feature] Add Augments to Starting Items for Bots/Players (#4100)

* [Feature] Add Augments to Starting Items for Bots/Players

- Adds support for augments to `bot_starting_items` and `starting_items`.
- Will allow operators to kit bots/players out with augmented gear from the start if they so choose.

* Update database_update_manifest.cpp

* Update client.cpp

* [Quest API] Add Hatelist Count Methods to Perl/Lua (#4106)

# Perl
- Add `$mob->GetHateListCount()`.# Perl
- Add `$mob->GetHateListCount()`.
- Add `$mob->GetHateListBotCount()`.
- Add `$mob->GetHateListClientCount()`.
- Add `$mob->GetHateListNPCCount()`.

# Lua
- Add `mob:GetHateListCount()`.
- Add `mob:GetHateListBotCount()`.
- Add `mob:GetHateListClientCount()`.
- Add `mob:GetHateListNPCCount()`.

# Notes
- Allows operators to more easily get a total entity count of a Mob's hate list, can do an overall count, or specifically bots, clients, or NPCs.

* [Bug Fix] Added additional Guild-related crash checks (#4105)

* [Bug Fix] Fix hotzone string error (#4109)

The Strings entry was from a newer client. Moved text to a raw message.

* [Repositories] Update `zone` base repository from #4084 (#4111)

* [Beacon] Revert a few lines of PR #4024 that broke beacons (#4118)

* [Bug Fix] Crash on Ubuntu 22.04 (#4119)

Ubuntu 22.04 as of Feb 25 2024 was crashing when sending guild tributes on zone in.  Issue was caused by an overrun on string copies.
Updated to use strn0cpy, crash was resolved.

* [Guilds] Fixes for Guild Bank (#4120)

Updates guild bank functionality
- Allows QTY 100 in guild bank
- Removes bug when deposit area is full and a UF or RoF2 client attempts to deposit another item
- Attempt to deposit a nodrop item in RoF2 creates a dupe situation

* [Quest API] Add Pet Methods to Perl/Lua (#4116)

* [Quest API] Add Pet Methods to Perl/Lua

# Perl
- Add `$mob->IsAnimation()`.
- Add `$mob->IsCharmed()`.
- Add `$mob->IsFamiliar()`.
- Add `$mob->IsTargetLockPet()`.

# Lua
- Add `mob:IsAnimation()`.
- Add `mob:IsCharmed()`.
- Add `mob:IsFamiliar()`.
- Add `mob:IsTargetLockPet()`.

# Notes
- These methods were not exported and could be useful for operators.

* Update perl_mob.cpp

* [Quest API] Add GetNPCSpellsEffectsID() to Perl/Lua (#4117)

# Perl
- Add `$npc->GetNPCSpellsEffectsID()`.

# Lua
- Add `npc:GetNPCSpellsEffectsID()`.

# Notes
- Allows operator's to get an NPC's spell effects ID.

* [Quest API] Add GetAugmentIDs() to Perl/Lua (#4114)

# Perl
- Add `$questitem->GetAugmentIDs()`.

# Lua
- Add `iteminst:GetAugmentIDs()`.

# Notes
- Allows operators to get a list of augment IDs from an item instance directly without using the inventory method.

* [Quest API] Add Bot Methods to Perl/Lua (#4113)

* [Quest API] Add Bot Methods to Perl/Lua

# Perl
- Add `quest::GetBotClassByID(bot_id)`.
- Add `quest::GetBotGenderByID(bot_id)`.
- Add `quest::GetBotIDsByCharacterID(character_id)`.
- Add `quest::GetBotIDsByCharacterID(character_id, class_id)`.
- Add `quest::GetBotLevelByID(bot_id)`.
- Add `quest::GetBotNameByID(bot_id)`.
- Add `quest::GetBotRaceByID(bot_id)`.

# Lua
- Add `eq.get_bot_class_by_id(bot_id)`.
- Add `eq.get_bot_gender_by_id(bot_id)`.
- Add `eq.get_bot_ids_by_character_id(character_id)`.
- Add `eq.get_bot_ids_by_character_id(character_id, class_id)`.
- Add `eq.get_bot_level_by_id(bot_id)`.
- Add `eq.get_bot_name_by_id(bot_id)`.
- Add `eq.get_bot_race_by_id(bot_id)`.

# Notes
- Allows operators to get a list of a player's bot IDs, get a bot's class, gender, level, name, and race.

* Update bot_database.cpp

* [Bug Fix] Fix Bot Weapons with No Races (#4110)

# Notes
- Bot weapons that have no races were not causing damage and saying the target was invulnerable because we were not checking the `Bots:AllowBotEquipAnyRaceGear` rule.

* [Quest API] Export Combat Record to Death Events (#4112)

# Perl
- Add `$combat_start_time`, `$combat_end_time`, `$damage_received`, and `$healing_received` to death events for NPCs.

# Lua
- Add `e.combat_start_time`, `e.combat_end_time`, `e.damage_received`, and `e.healing_received` to death events for NPCs.

# Notes
- Allows operators to hook in to the combat record logic so they can log the start and end of combat as well as the damage/healing received over the course of the fight.

* [Release] 22.45.0 (#4121)

* [Quest API] Add Pet Owner Methods to Perl/Lua (#4115)

* [Quest API] Add Pet Owner Methods to Perl/Lua

- Add `$mob->IsPetOwnerBot()`.
- Add `$mob->IsPetOwnerClient()`.
- Add `$mob->IsPetOwnerNPC()`.

- Add `mob:IsPetOwnerBot()`.
- Add `mob:IsPetOwnerClient()`.
- Add `mob:IsPetOwnerNPC()`.

- Allows operators to use these short hands instead of doing a `GetOwner() && GetOwner()->IsClient()`.

* Update npc.cpp

* [Bug Fix] Who /all displays incorrect guild name (#4123)

Issue: guild creation routine does not update world memory holding guild details until the player zones.

Between the creation of a new guild, and a guild member zones, a /who all displays 'Invalid Guild' instead of the actual guild name.

* [Cleanup] Fix Server Rules Documentation Generation (#4125)

# Notes
- These spaces prevented the docs server rules generator from parsing these rules.

* [Character Creation] Improved Random Name Generator (#4081)

* test against vanilla branch

* use existing methods to validate name instead of raw sql

* Revert "use existing methods to validate name instead of raw sql"

This reverts commit 43750c6f4f597864f3e433885f9e3f84144e3d65.

* ReserveName doesn't work like that. Oops. Well, check against Name Filter at least.

* That db access condition was wrong.

* that isn't how CheckNameFilter works, either.

* apply editorconfig w/ trivial change

* Actually apply editorconfig changes.

* [Cleanup] Remove unnecessary stoptimer logs (#4128)

# Notes
- These logs were for testing and are unnecessary.
- They cause a lot of spam for servers using `Info` logs.

* [Hotfix] Fix forage returning first result from table (#4130)

Forage was not properly incrementing the total chance of items when more than one was found and would result in the final chance roll being based off the last item found rather than the total. This would cause the first item returned to be chosen in most cases when the chances are the same in the table.

* [Crash Fix] D20 crash if mitigation average resulted in 0 (#4131)

* [Crash] Fix crash issue during database dump (#4127)

* [Commands] Add `#forage` command (#4133)

* [Release] 22.45.1 (#4135)

### Character Creation

* Improved Random Name Generator ([#4081](https://github.com/EQEmu/Server/pull/4081)) @catapultam-habeo 2024-02-27

### Code

* Fix Server Rules Documentation Generation ([#4125](https://github.com/EQEmu/Server/pull/4125)) @Kinglykrab 2024-02-26
* Remove unnecessary stoptimer logs ([#4128](https://github.com/EQEmu/Server/pull/4128)) @Kinglykrab 2024-02-28

### Commands

* Add `#forage` command ([#4133](https://github.com/EQEmu/Server/pull/4133)) @joligario 2024-02-29

### Crash

* Fix crash issue during database dump ([#4127](https://github.com/EQEmu/Server/pull/4127)) @Akkadius 2024-02-29

### Crash Fix

* D20 crash if mitigation average resulted in 0 ([#4131](https://github.com/EQEmu/Server/pull/4131)) @nytmyr 2024-02-29

### Fixes

* Fix forage returning first result from table ([#4130](https://github.com/EQEmu/Server/pull/4130)) @nytmyr 2024-02-29
* Who /all displays incorrect guild name ([#4123](https://github.com/EQEmu/Server/pull/4123)) @neckkola 2024-02-25

### Quest API

* Add Pet Owner Methods to Perl/Lua ([#4115](https://github.com/EQEmu/Server/pull/4115)) @Kinglykrab 2024-02-25

* [Bug Fix] Fix issue with NPC Secondary Textures (#4129)

* [Bug Fix] Fix issue with NPC heads

# Notes
- We were overwriting head material within this secondary loop which caused NPC's heads to show their body texture in some places or no texture if their `showhelm` was not flagged.

# Images

* Update mob.cpp

* Update mob.cpp

* Update mob.cpp

* [Commands] Add #fish Command (#4136)

* [Commands] Add #fish Command

# Notes
- Adds `#fish` command.
- Allows operators to simulate fishing to see what they would get, consumes no bait.

* `use_bait`

* Update fish.cpp

* [Bug Fix] Use std::clamp for Mob::ChangeSize (#4140)

Helper template was not deducing float for lower/upper values allowing invalid sizes
Limit to sane values of 1-255 unrestricted and 3-15 for clients and pets

* [Crash Fix] Raid::UpdateGroupAAs (#4139)

Added checks to potentially resolve a crash situation with raids and group AAs.

* [Bug Fix] Cleanup NPC Mana Tap Logic (#4134)

* [Bug Fix] Cleanup NPC Mana Tap Logic

Mana Tap rule logic was invalid - Cleaned up and simplified, either we care about npc mana or we dont.

* Updated for bypass all rule

* Change so melee targets get blocked even with requiremana rule off

---------

Co-authored-by: Trust <fryguy503@gmail.com>

* [Feature] Exempt a zone from IP-limit checks. (#4137)

* Exempt zone from IP checks

* [Feature] Add Support for String-based Rules

# Notes
- Add support for string-based rules.

# Images

* convert to comma-seperated list

* Forgot to convert the zone to a string

* Update lua_general.cpp

* fixed rule name

* use the local string methods instead

* I think this will work as desired without the extra condition

---------

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>

* [Crash Fix] Update to location of qGlobals initialization (#4144)

* [Bug Fix] Update FreeGuildID Routine (#4143)

Updates the routine to determine a free guild id on guild creation

* [Bug Fix] Fix Bots/Bot Pets ending up on XTargets (#4132)

* [XTargets]

* Update eqemu_logsys.h

* Update client.cpp

* Update table column

* Undo unnecessary commit

* [Bug Fix] GetBotNameByID Temporary Reference Warning (#4145)

# Notes
- We were getting a warning for returning `std::string()` from this method as it's a temporary reference.
- Change from `const std::string&` to `const std::string` to avoid this.
```
/home/eqemu/source/zone/bot_database.cpp: In member function ‘const std::string& BotDatabase::GetBotNameByID(uint32)’:
/home/eqemu/source/zone/bot_database.cpp:2374:25: warning: returning reference to temporary [-Wreturn-local-addr]
 2374 |         return e.bot_id ? e.name : std::string();
```

* [Quest API] Add Bot Special Attacks for Immune Aggro/Damage (#4108)

* [Quest API] Add Bot Special Attacks for Immune Aggro/Damage

# Notes
- Adds `IMMUNE_AGGRO_BOT` and `IMMUNE_DAMAGE_BOT` for uses in special abilities.

* Cleanup

* Update attack.cpp

* [Zone] Zone Routing Improvements (#4142)

* Routing changes

* Update world_content_service.cpp

* Cleanup routing logic

* Tweaks

* [Release] 22.46.0 (#4146)

* [Bug Fix] Change `UnburyCorpse` to use repository methods (#4147)

* [Release] 22.46.1 (#4148)

### Fixes

* Change `UnburyCorpse` to use repository methods ([#4147](https://github.com/EQEmu/Server/pull/4147)) @joligario 2024-03-03

* [Quest API] Add IsDestructibleObject() to Perl/Lua (#4153)

# Perl
- Add `$mob-.IsDestructibleObject()`.

# Lua
- Add `mob:IsDestructibleObject()`.

# Notes
- Allows operators to determine if a mob is a destructible object.

* [Quest API] Add IsBoat()/IsControllableBoat() to Perl/Lua (#4151)

- Add `$mob->IsBoat()`.
- Add `$mob->IsControllableBoat()`.

- Add `mob:IsBoat()`.
- Add `mob:IsControllableBoat()`.

- Allows operators to determine if a mob is a boat or a controllable boat.

* [Quest API] Add GetHeroicStrikethrough() to Perl/Lua (#4150)

- Add `$mob->GetHeroicStrikethrough()`.

- Add `mob:GetHeroicStrikethrough()`.

- Allows operators to get a mob's Heroic Strikethrough.

* [Quest API] Add IsAlwaysAggro() to Perl/Lua (#4152)

- Add `$mob->IsAlwaysAggro()`.

- Add `mob:IsAlwaysAggro()`.

- Allows operators to determine if a mob is set to always aggro.

* [Crash Fix] Groundspawn Memory Corruption (#4157)

* [Crash Fix] Goto Command could crash using Developer Tools (#4158)

* [Feature] Adds rules to control level requirements for Double Backstab, Assassinate, and Double Bowshot (#29) (#4159)

Co-authored-by: mute <natanx@gmail.com>

* [Bug Fix] Add id to the guild_bank table (#4155)

* Add id to guild_bank table

Add id as a primary key to guild_bank

* Remove content schema update flag

* [Bug Fix] Fix typo when updating spawn events in spawn condition manager (#4160)

* [Bug Fix] Fix Spawns Not Parsing Quest on Zone Bootup (#4149)

* Update zone.cpp

* Fix

---------

Co-authored-by: Natedog2012 <jwalters_06@yahoo.com>

* [Bug Fix] Prevent NPE when creating DZ using ad-hoc version IDs (#4141)

* initial commit

* corrected based on hgtw feedback

* [Feature] Adjust String-based Rules Length (#4138)

* [Zoning] Zone routing adjustment (#4162)

* [Bug Fix] Fix Character EXP Modifiers default (#4161)

# Notes
- The `-1.0f` was causing these modifiers to be set to `0.0` and when people would enable them they would get no experience.
- We now use the zone based grabbed methods when setting which will default to a value of `1.0f` if there is not a value found.

* [Crash Fix] Added a guild_mgr check (#4163)

* CrashFix and Cleanup

* Formatting, add safe_delete

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>

* [Release] 22.47.0 (#4164)

* [Release] 22.47.0

* [Quest API] Add DeleteBot() to Perl/Lua (#4167)

### Perl
- Add $bot->DeleteBot().
```
sub EVENT_SAY {
	if ($text =~/#deletebot/i && $client->Admin() >= 100) {
		my @bot_list = $entity_list->GetBotList();

		foreach $ent (@bot_list) {
			if ($ent) {
				quest::shout("Deleting " . $ent->GetCleanName());
				$ent->DeleteBot();
				$ent->Camp(0);
			}
		}
	}
}
```
### Lua
- Add bot:DeleteBot().
```
function event_say(e)
	if(e.message:findi("#deletebot")) then
		local bot_list = eq.get_entity_list():GetBotList();

		for ent in bot_list.entries do
			if (ent) then
				e.self:Message(7,"Deleting " .. ent:GetCleanName() .. "");
				ent:DeleteBot();
				ent:Camp(false);
			end
		end
	end
end
```
### Notes
- Allows operators to delete bots.

* [Bug Fix] Fix Default Value in `rule_values` table (#4166)

# Notes
- Some versions of SQL do not allow a default value for text fields.

* [Bots] Move BotGroupSay to Pet Response (#4171)

* [Bots] Move BotGroupSay messages to PetResponse filter to reduce spam

* Cleanup raid checks

* Group cleanup

* [Bug Fix] An Update to Xtarget to exclude Bot owned Temp/Swarm Pets (#4172)

* An Update to Xtarget to exclude Bot owned Temp/Swarm Pets

* Missing a parentheses

* Cleaned up logic.

* [Quest API] Add RemoveAAPoints() and AA Loss Event to Perl/Lua (#4174)

* [Quest API] Add RemoveAAPoints() and AA Loss Event to Perl/Lua

# Perl
- Add `$client->RemoveAAPoints(points)`.
- Add `EVENT_AA_LOSS`, exports `$aa_lost`.

# Lua
- Add `client:RemoveAAPoints(points)`.
- Add `event_aa_loss`, exports `e.aa_lost`.

# Notes
- Allows operators to more easily remove AA Points.
- Has a bool return type that will return false if the player does not have enough AA Points to complete the removal.

* Update client.cpp

* [Cleanup] Cleanup Zone Get Methods (#4169)

# Notes
- Utilize `GetZoneVersionWithFallback` to shorten methods and reduce duplicate code.

* [Hot Fix] Add bool return to fix Client::RemoveAAPoints (#4176)

# Notes
- Was missing the `return true;` at the bottom.

* [Bug Fix] Fix Crash in ClientList::GetCLEIP (#4173)

* [Bug Fix] Fix Crash in ClientList::GetCLEIP

# Notes
- We were not validating pointer when moving to next iterator.

# Crashes
https://spire.akkadius.com/dev/release/22.46.1?id=19955
https://spire.akkadius.com/dev/release/22.46.1?id=19948
https://spire.akkadius.com/dev/release/22.46.0?id=19945

* Update clientlist.cpp

* Update clientlist.cpp

* [Bug Fix] Fix Mob::CalculateDistance(mob) Typo (#4183)

# Notes
- Was using `GetX()` for all parts of the calculation, meaning it would produce incorrect values.
- Part of [this](https://github.com/EQEmu/Server/pull/3455/files#diff-94a8e3b04f001e4f74ce2da8404cbce7653146d963a3b93be6536505035ce96dR602-R607).

* [Bots] IsValidTarget Crash Fix (#4187)

* [Bots] IsValidTarget crash fix

This addresses crashes related to IsValidTarget on multiple servers.

Unsure of the exact reason if anyone can explain why changing from const bool to bool in this situation fixes the problem.

Is it because the const is somehow crashing on a bad pointer or is it attempting to be force changed?

* Update bot.cpp

---------

Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>

* [Quest API] Add GetDeityName() to Perl/Lua (#4180)

# Perl
- Add `$mob->GetDeityName()`.

# Lua
- Add `mob:GetDeityName()`.

# Notes
- Allows operators to get a mob's deity name.

* [Bug Fix] Fix Empty Groups When Removing Bots (#4178)

# Notes
- We were checking for the incorrect value, meaning you could end up in an empty group.

* [Quest API] Add Silent Saylink Methods to Perl/Lua (#4177)

# Perl
- Add `quest::silent_saylink(text)`.
- Add `quest::silent_saylink(text, link_name)`.

# Lua
- Add `eq.silent_say_link(text)`.
- Add `eq.silent_say_link(text, link_name)`.

# Notes
- Allows operators to m…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants